craftcms/cms
Affected
- introduced
5.0.0-alpha.1, fixed5.4.9(ecosystem)
Fixed versions
5.4.9
Fix
The export has no generic command for this ecosystem.
Advisory
Also known as: CVE-2024-52292
Craft CMS Arbitrary System File Read
Summary
By abusing the mail notification template it is possible to read arbitrary operating system files.
Details
The dataUrl function can be exploited if an attacker has write permissions on system notification templates. This function accepts an absolute file path, reads the file's content, and converts it into a Base64-encoded string. By embedding this function within a system notification template, the attacker can exfiltrate the Base64-encoded file content through a triggered system email notification. Once the email is received, the Base64 payload can be decoded, allowing the attacker to read arbitrary files on the server.
Requirements:
PoC
{{ dataUrl('/var/www/web/.env') }}
Mail received:
Bildschirmfoto 2024-09-05 um 16 20 41
Decoded string:
Bildschirmfoto 2024-09-05 um 16 28 24
Impact
High Basis: The source's own band: HIGH
5.0.0-alpha.1, fixed 5.4.9 (ecosystem)5.4.9
The export has no generic command for this ecosystem.
3.5.13, fixed 4.12.8 (ecosystem)4.12.8
The export has no generic command for this ecosystem.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0