Skip to content

Craft CMS stored XSS in review volume

Moderate severity GitHub Reviewed Published May 25, 2023 in craftcms/cms • Updated Nov 8, 2023

Package

composer craftcms/cms (Composer)

Affected versions

>= 4.0.0-RC1, <= 4.4.6

Patched versions

4.4.7

Description

Summary

XSS can be triggered by review volumes

PoC

1. Access setting tab
2. Create new assets
3. In assets name inject payload: "<script>alert(1337)</script>
4. Click Utilities tab
5. Choose all volumes, or volume trigger xss
6. Click Update asset indexes.
7. Wait to assets update success.
8. Progress complete.
9. Click on review button will trigger XSS

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

References

@angrybrad angrybrad published to craftcms/cms May 25, 2023
Published to the GitHub Advisory Database May 26, 2023
Reviewed May 26, 2023
Published by the National Vulnerability Database May 26, 2023
Last updated Nov 8, 2023

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L

EPSS score

0.094%
(41st percentile)

CVE ID

CVE-2023-33196

GHSA ID

GHSA-cjmm-x9x9-m2w5

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.