Update dependency craftcms/cms to ^4.7.0 [SECURITY] #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^4.0.0
->^4.7.0
GitHub Vulnerability Alerts
CVE-2022-37250
Craft CMS 4.2.0.1 suffers from Stored Cross Site Scripting (XSS) in
/admin/myaccount
.CVE-2022-37248
Craft CMS 4.2.0.1 is vulnerable to Cross Site Scripting (XSS) via
src/helpers/Cp.php
.CVE-2022-37251
Craft CMS
3.70-RC1
–3.7.55.1
and4.0.0-RC1
–4.2.0.1
are vulnerable to Cross Site Scripting (XSS) via entry revisions and drafts. Versions3.7.55.2
and4.2.1
contain patches for this issue.CVE-2022-37247
Craft CMS 4.2.0.1 is vulnerable to stored a cross-site scripting (XSS) via /admin/settings/fields page.
CVE-2022-37246
Craft CMS 4.2.0.1 is affected by Cross Site Scripting (XSS) in the file src/web/assets/cp/src/js/BaseElementSelectInput.js and in specific on the line
label: elementInfo.label
.CVE-2023-23927
Summary
When you insert a payload inside a label name or instruction of an entry type, an XSS happens in the quick post widget on the
admin dashboard.
PoC
2023-01-30.18-43-49.mp4
Impact
Tested with the free version of Craft CMS 4.3.6.1
CVE-2023-31144
A malformed title in the feed widget of craftcms/cms can deliver an XSS payload. This has been resolved in this commit.
CVE-2023-32679
Summary
Unrestricted file extension lead to a potential Remote Code Execution
(Authenticated, ALLOW_ADMIN_CHANGES=true)
Details
Vulnerability Cause :
If the name parameter value is not empty string('') in the View.php's doesTemplateExist() -> resolveTemplate() -> _resolveTemplateInternal() -> _resolveTemplate() function, it returns directly without extension verification, so that arbitrary extension files are rendered as twig templates (even if they are not extensions set in defaultTemplateExtensions = ['html', 'twig'])
When attacker with admin privileges on the DEV or Misconfigured STG, PROD, they can exploit this vulnerability to remote code execution (ALLOW_ADMIN_CHANGES=true)
PoC
Step 1) Create a new filesystem. Base Path: /var/www/html/templates
Step 2) Create a new asset volume. Asset Filesystem: template
Step 3) Upload poc file( .txt , .js , .json , etc ) with twig template rce payload
Step 4) Create a new global set with template layout. The template filename is poc.js
Step 5) When access global menu or /admin/global/test, poc.js is rendered as a template file and RCE confirmed
Step 6) RCE can be confirmed on other menus(Entries, Categories) where the template file is loaded.
Poc Environment) ALLOW_ADMIN_CHANGES=true, defaultTemplateExtensions=['html','twig']
Impact
Take control of vulnerable systems, Data exfiltrations, Malware execution, Pivoting, etc.
Additionally, there are 371 domains using CraftCMS exposed on Shodan, and among them, 33 servers have "stage" or "dev" included in their hostnames.
although the vulnerability is exploitable only in the authenticated users, configuration with ALLOW_ADMIN_CHANGES=true, there is still a potential security threat (Remote Code Execution)
Remediation
Recommend taking measures by referring to https://github.com/craftcms/cms-ghsa-9f84-5wpf-3vcf/pull/1
CVE-2023-33194
Summary
The platform does not filter input and encode output in Quick Post validation error message, which can deliver an XSS payload.
Details
Old CVE fixed the XSS in label HTML but didn’t fix it when clicking save.
PoC
Login at admin
Go to setting
Create a Section
On Entry page, click Edit label
Inject the XSS payload into the label and save
On the admin dashboard choose new widget -> Quick Post
In Quick Post, click save with blank slug; The XSS will be executed
"errors":{"title":["<script>alert('nono')</script> cannot be blank."],"slug":["Slug cannot be blank."]
Fixed in craftcms/cms@9d0cd0b
CVE-2023-33196
Summary
XSS can be triggered by review volumes
PoC
Root cause
Function: index.php?p=admin/actions/asset-indexes/process-indexing-session&v=1680710595770
After loading completed, progess will load:
"skippedEntries"
and
"missingEntries"
These parameters is not yet filtered, I just tried "skippedEntries" but I think it will be work with "missingEntries"
My reponse:
{
"session": {
"id": 10,
"indexedVolumes": {
"6": ""<script>alert(1337)</script>"
},
"totalEntries": 2235,
"processedEntries": 2235,
"cacheRemoteImages": true,
"listEmptyFolders": false,
"isCli": false,
"actionRequired": true,
"dateCreated": "Apr 5, 2023, 9:03:16 AM",
"skippedEntries": [
""<script>alert(1337)</script>/assetpreviews/Image.php",
""<script>alert(1337)</script>/assetpreviews/Pdf.php"
],
"missingEntries": {
"folders": [],
"files": []
},
"processIfRootEmpty": false
},
"skipDialog": false
}
Resolved in craftcms/cms@053d711
CVE-2023-33197
Summary
XSS can be triggered via the Update Asset Index utility
PoC
XSS will be triggered
Json response volumes name makes triggers the payload
It’s run on every POST request in the utility.
Resolved in craftcms/cms@8c2ad0b
CVE-2023-2817
A post-authentication stored cross-site scripting vulnerability exists in Craft CMS versions <= 4.4.11. HTML, including script tags can be injected into field names which, when the field is added to a category or section, will trigger when users visit the Categories or Entries pages respectively. This issue was patched in version 4.4.12.
CVE-2023-40035
Summary
Bypassing the validatePath function can lead to potential Remote Code Execution
(Post-authentication, ALLOW_ADMIN_CHANGES=true)
Details
In bootstrap.php, the SystemPaths path is set as below.
Because paths are validated based on the /path1/path2 format, this can be bypassed using a file URI scheme such as file:///path1/path2. File scheme is supported in mkdir()
ref. https://www.php.net/manual/en/wrappers.file.php
PoC
PoC Env
Impact
Take control of vulnerable systems, Data exfiltrations, Malware execution, Pivoting, etc.
although the vulnerability is exploitable only in the authenticated users, configuration with ALLOW_ADMIN_CHANGES=true, there is still a potential security threat (Remote Code Execution)
CVE-2023-41892
Impact
This is a high-impact, low-complexity attack vector. Users running Craft installations before 4.4.15 are encouraged to update to at least that version to mitigate the issue.
Mitigations
php craft setup/security-key
command and copying the updatedCRAFT_SECURITY_KEY
environment variable to all production environments.php craft resave/users --set passwordResetRequired --to "fn() => true"
.References
craftcms/cms@c0a37e1#diff-47dd43d86f85161944dfcce2e41d31955c4184672d9bd9d82b948c6b01b86476
craftcms/cms@7359d18
craftcms/cms@a270b92
https://github.com/craftcms/cms/blob/develop/CHANGELOG.md#4415---2023-07-03-critical
CVE-2024-21622
Impact
This is a potential moderate impact, low complexity privilege escalation vulnerability in Craft with certain user permissions setups.
Patches
This has been fixed in Craft 4.4.16 and Craft 3.9.6. Users should ensure they are running at least those versions.
References
https://github.com/craftcms/cms/pull/13932
https://github.com/craftcms/cms/pull/13931
https://github.com/craftcms/cms/blob/develop/CHANGELOG.md#4511---2023-11-16
https://github.com/craftcms/cms/blob/v3/CHANGELOG.md#396---2023-11-16
CVE-2023-36260
An issue discovered in Craft CMS version 4.6.1.1 allows remote attackers to cause a denial of service (DoS) via crafted string to Feed-Me Name and Feed-Me URL fields due to saving a feed using an Asset element type with no volume selected.
Release Notes
craftcms/cms (craftcms/cms)
v4.7.0
Compare Source
Content Management
Administration
utils/prune-orphaned-matrix-blocks
command. (#14154)Extensibility
craft\base\ElementInterface::beforeDeleteForSite()
.craft\base\ElementInterface::afterDeleteForSite()
.craft\base\FieldInterface::beforeElementDeleteForSite()
.craft\base\FieldInterface::afterElementDeleteForSite()
.System
phpsessions
table, if it exists. (#13589)auto_position
plugin. (#14160)craft\web\CpScreenResponseBehavior::editUrl()
weren’t getting resolved to absolute URLs.v4.6.1
Compare Source
craft\log\MonologTarget
instances are now created viaCraft::createObject()
. (#13341)craft\helpers\Db::prepareValueForDb()
wasn’t converting objects to arrays for JSON columns.0
options within element indexes or condition rules. (#14127, #14143)craft\db\Migration::renameTable()
was renaming the table for the primary database connection, rather than the migration’s connection. (#14131)Craft.FormObserver
wasn’t working reliably for non-<form>
containers.v4.6.0
Compare Source
Content Management
Administration
disabledUtilities
config setting. (#14044)showFirstAndLastNameFields
config setting. (#14097)resave
commands now pass an empty string (''
) to fields’normalizeValue()
methods when--to
is set to:empty:
. (#13951)sections/create
command now supports--name
,--handle
,--type
,--no-versioning
,--uri-format
, and--template
options, and can now be run non-interactively. (#13864)index-assets/one
andindex-assets/all
commands now accept a--delete-empty-folders
option. (#13947)Extensibility
craft\base\conditions\ConditionRuleInterface::getLabelHint()
.craft\helpers\AdminTable::moveToPage()
. (#14051)craft\helpers\App::dbMutexConfig()
.craft\helpers\ElementHelper::searchableAttributes()
.craft\services\Elements::setElementUri()
.craft\services\Elements::EVENT_SET_ELEMENT_URI
. (#13930)craft\services\Search::createDbQuery()
.craft\base\MemoizableArray
now supports passing a normalizer method to the constructor, which will be lazily applied to each array item once, only if returned byall()
orfirstWhere()
. (#14104)craft\elements\actions\DeleteAssets
is no longer deprecated.craft\helpers\ArrayHelper::firstWhere()
now has a$valueKey
argument, which can be passed a variable by reference that should be set to the resulting value’s key in the array.craft\helpers\App::mutexConfig()
.Craft.FormObserver
. (#14114)footerActions
,moveToPageAction
,onCellClicked
,onCellDoubleClicked
,onRowClicked
,onRowDoubleClicked
, andpaginatedReorderAction
settings. (#14051)System
queue/get-job-info
action requests no longer create a mutex lock.mutex
driver is now set toyii\mutex\MysqlMutex
oryii\mutex\PgsqlMutex
by default, once again. (#14102)v4.5.15
Compare Source
craft\helpers\DateTimeHelper::nextYear()
andlastYear()
weren’t returning the correct dates. (#14109)maxCachedCloudImageSize
was set to0
. (#14100)craft\fields\BaseRelationField::normalizeValue()
wasn’t retaining eager-loaded values. (#14117)v4.5.14
Compare Source
relatedToAssets
,relatedToCategories
,relatedToEntries
,relatedToTags
, andrelatedToUsers
are now reserved user field handles. (#14075)craft\services\Security::$sensitiveKeywords
is no longer case-sensitive. (#14064)index-assets/cleanup
command accepted--cache-remote-images
,--create-missing-assets
, and--delete-missing-assets
options, even though they didn’t do anything.craft\web\Request::getIsPreview()
was returningtrue
for requests with expired tokens. (#14066)index-assets/one
command was overly-destructive when run with a subpath and the--delete-missing-assets
option. (#14087)v4.5.13
Compare Source
autocomplete
values when editing an address that belongs to the current user. (#13938)|markdown
and|md
filters now accept anencode
argument, which can be set totrue
to HTML-encode the content before parsing it as Markdown.pre-encoded
Markdown flavor, which can be used when the content has already been HTML-encoded.craft\elements\Address::getBelongsToCurrentUser()
.{% namespace %}
tags weren’t respecting namespaces set to0
. (#13943)SCENARIO_CREATE
, ifAsset::$tempFilePath
wasn’t set. (#14041)v4.5.12
Compare Source
autocomplete
values when editing the current user. (#13941)craft\db\Connection::onAfterTransaction()
.craft\errors\MutexException
. (#13985)craft\fieldlayoutelements\TextField::$inputType
. (#13988)craft\fieldlayoutelements\TextField::$type
.$inputType
should be used instead. (#13988)craft\base\ApplicationTrait::onAfterRequest()
callbacks weren’t necessarily triggered if anEVENT_AFTER_REQUEST
handler got in the way.craft\services\Elements::EVENT_AUTHORIZE_VIEW
event wasn’t always triggered when editing elements. (#13981))autosaveDrafts
config setting was disabled. (#13921)v4.5.11
Compare Source
craft\gql\types\DateTime::$setToSystemTimeZone
.craft\gql\types\DateTime
now supports JSON-encoded objects withdate
,time
, andtimezone
keys.craft\web\Response::setCacheHeaders()
now includes thepublic
directive in theCache-Control
header. (#13922)localized
GraphQL field wasn’t returning any results for drafts or revisions. (#13924)v4.5.10
Compare Source
db/drop-table-prefix
command.owner
address query param.title
attribute. (#13876)--column-inserts
topg_dump
.craft\web\AssetManager::$cacheSourcePaths
.sortOrder
values were the same. (#13896)v4.5.9
Compare Source
storage/
folder existed.v4.5.8
Compare Source
focalPoint
argument to asset save mutations. (#13846)up
command now accepts a--no-backup
option.{% cache %}
tags now store any<meta>
tags registered withyii\web\View::registerMetaTag()
. (#13832)craft\errors\ExitException
.craft\web\View::startMetaTagBuffer()
.craft\web\View::clearMetaTagBuffer()
.craft_modify_app_config()
function. (#13855){% exit %}
tags without a status code weren’t outputting any HTML that had already been output in the template. (#13848)v4.5.7
Compare Source
pgpassword
andpwd
to the list of keywords that Craft will look for when determining whether a value is sensitive and should be redacted from logs, etc.craft\events\DefineCompatibleFieldTypesEvent
.craft\services\Fields::EVENT_DEFINE_COMPATIBLE_FIELD_TYPES
. (#13793)craft\web\assets\inputmask\InputmaskAsset
.craft\web\Request::accepts()
now supports wildcard (e.g.application/*
). (#13759)Craft.ElementEditor
instances are now configured with anelementId
setting, which is kept up-to-date when a provisional draft is created. (#13795)Garnish.isPrimaryClick()
.defaultDirMode
config setting wasn’t being respected when thestorage/runtime/
andstorage/logs/
folders were created. (#13756)transformGifs
andtransformSvgs
config settings weren’t always being respected when using@transform
GraphQL directives. (#13808)require
packages differently than how Composer does it natively, whenconfig.sort-packages
was set totrue
. (#13806)v4.5.6
Compare Source
autosaveDrafts
config setting is disabled. (#12348)resave/addresses
command. (#13720)resave/matrix-blocks
command now supports an--owner-id
option.craft\helpers\App::phpExecutable()
.craft\helpers\Component::cleanseConfig()
.craft\helpers\Component::createComponent()
now filters outas X
andon X
keys from the component config.craft\services\Announcements::push()
now has an$adminsOnly
argument. (#13728)Craft.appendHeadHtml()
andappendBodyHtml()
now load external scripts asynchronously, and return promises.onQueryParams
callback method wasn’t set. (#13677)CRAFT_DOTENV_PATH
environment variable was set, or a console command was executed with the--dotenvPath
option. (#13725)craft\services\Elements::saveElement()
was called with$runValidation
set tofalse
.v4.5.5
Compare Source
maxGraphqlBatchSize
config setting. (#13693)v4.5.4
Compare Source
@stripTags
and@trim
GraphQL directives. (#9971)SK
to the list of keywords that Craft will look for when determining whether a value is sensitive and should be redacted from logs, etc. (#3619)|replace
Twig filter now has aregex
argument, which can be set tofalse
to disable regular expression parsing. (#13642)craft\events\DefineUserGroupsEvent
.craft\services\Users::EVENT_DEFINE_DEFAULT_USER_GROUPS
. (#12283)craft\services\Users::getDefaultUserGroups()
.craft\events\UserAssignGroupEvent
now extendsDefineUserGroupsEvent
, giving it a new$userGroups
property.craft\helpers\DateTimeHelper::toDateTime()
now supportsDateTimeImmutable
values. (#13656)craft\web\Response::setCacheHeaders()
no longer includespublic
in theCache-Control
header when$overwrite
isfalse
. (#13676)craft\events\UserAssignGroupEvent
.DefineUserGroupsEvent
should be used instead.craft\services\Elements::duplicateElement()
now supports passing asiteAttributes
array to the$attributes
argument, for setting site-specific attributes.photo
field.value
key. (#13648)typeId
labels for admin users with “Show field handles in edit forms” enabled. (#13627)transformGifs
andtransformSvgs
config settings weren’t always being respected. (#13624, #13635)fill
transform properties weren’t being passed along bycraft\elements\Asset::getUrlsBySize()
andgetSrcset()
. (#13650)v4.5.3
Compare Source
null
values astrue
.Craft.namespaceId()
wasn’t working properly if the namespace ended in a]
character.|replace
Twig filter wasn’t identifying regular expressions that contained escaped slashes. (#13618)v4.5.2
Compare Source
craft\helpers\UrlHelper::buildQuery()
is no longer deprecated. (#12796)Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.