Every CVE Search/ Get API key

CVE-2024-52292

Craft Allows Attackers to Read Arbitrary System Files

7.7 HighFix available

Craft is a content management system (CMS). 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. This is fixed in 5.4.9 and 4.12.8.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
None
Availability
None

Exploit likelihood

0.75%Up 0.7 points since Nov 14, 2024
90%50%10%1%

What each source reports

CVE List Score used 7.7

Craft Allows Attackers to Read Arbitrary System Files

Craft is a content management system (CMS). 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. This is fixed in 5.4.9 and 4.12.8.

Record
CVE-2024-52292
CVSS 3.1
7.7 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Weakness
CWE-552, CWE-22
Updated
2026-11-02
EUVDEUVD-2024-3238 7.7

Craft is a content management system (CMS). 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. This is fixed in 5.4.9 and 4.12.8.

Record
EUVD-2024-3238
CVSS 3.1
7.7 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-cw6g-qmjq-6w2w 7.0

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:

  • write permissions to system notification templates
  • ability to trigger a corresponding system email

PoC

  1. Modify a template to contain the following twig template string:
{{ dataUrl('/var/www/web/.env') }}
  1. Trigger the corresponding notification email (e.g. by resetting a password)
  2. Receive the email and decode the base64 string

Mail received:

Decoded string:

Impact

  1. Exposure of Sensitive Information: Arbitrary file read can lead to the exposure of sensitive data such as configuration files (e.g., /etc/passwd, .env, config.php), which may contain credentials, API keys, or database passwords. This can provide the attacker with further access to the system or connected services.

  2. Privilege Escalation: If the attacker is able to read files that contain privileged information, such as credentials for other systems or applications, they may be able to escalate their privileges beyond what the web admin role originally allowed, potentially gaining full control over the server or other related systems.

  3. Server Compromise: Access to files like SSH keys, private certificates, or system configuration files can lead to the complete compromise of the underlying server. With this information, an attacker could remotely log in to the server or impersonate it in secure communications.

  4. Exfiltration of User Data: The ability to read arbitrary files may allow an attacker to access user data, such as stored passwords, session tokens, or private information (like uploaded files or logs), leading to a breach of confidentiality and violating privacy regulations (e.g., GDPR).

Record
GHSA-cw6g-qmjq-6w2w
CVSS 4.0
7.0 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N/E:P
CVSS 3.1
7.7 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Weakness
CWE-22, CWE-552
Updated
2026-11-02
NVD 7.7

Craft is a content management system (CMS). 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. This is fixed in 5.4.9 and 4.12.8.

Record
CVE-2024-52292
CVSS 3.1
7.7 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
CVSS 3.1
6.5 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Weakness
CWE-22, CWE-552
Updated
2026-11-02
OSV 7.7

Craft Allows Attackers to Read Arbitrary System Files

Craft is a content management system (CMS). 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. This is fixed in 5.4.9 and 4.12.8.

Record
CVE-2024-52292
CVSS 3.1
7.7 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Weakness
CWE-22, CWE-552
Updated
2026-11-02
OSVGHSA-cw6g-qmjq-6w2w 7.0

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:

  • write permissions to system notification templates
  • ability to trigger a corresponding system email

PoC

  1. Modify a template to contain the following twig template string:
{{ dataUrl('/var/www/web/.env') }}
  1. Trigger the corresponding notification email (e.g. by resetting a password)
  2. Receive the email and decode the base64 string

Mail received:

Decoded string:

Impact

  1. Exposure of Sensitive Information: Arbitrary file read can lead to the exposure of sensitive data such as configuration files (e.g., /etc/passwd, .env, config.php), which may contain credentials, API keys, or database passwords. This can provide the attacker with further access to the system or connected services.

  2. Privilege Escalation: If the attacker is able to read files that contain privileged information, such as credentials for other systems or applications, they may be able to escalate their privileges beyond what the web admin role originally allowed, potentially gaining full control over the server or other related systems.

  3. Server Compromise: Access to files like SSH keys, private certificates, or system configuration files can lead to the complete compromise of the underlying server. With this information, an attacker could remotely log in to the server or impersonate it in secure communications.

  4. Exfiltration of User Data: The ability to read arbitrary files may allow an attacker to access user data, such as stored passwords, session tokens, or private information (like uploaded files or logs), leading to a breach of confidentiality and violating privacy regulations (e.g., GDPR).

Record
GHSA-cw6g-qmjq-6w2w
CVSS 4.0
7.0 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N/E:P
CVSS 3.1
7.7 HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Weakness
CWE-22, CWE-552
Updated
2026-11-02
OSVCLSA-2026-1786625623 No score

TuxCare security update for craftcms/cms (1 CVE)

TuxCare rebuilt craftcms/cms to address 1 CVE. Fixed in 3.9.15-p8+tuxcare.

Record
CLSA-2026-1786625623
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
craftcms/cms
Packagist
5.0.0-alpha.1 to 5.4.7.1
5.4.9
craftcms/cms
Packagist
3.5.13 to 4.12.6.1
4.12.8
craftcms/cms
TuxCare:Packagist
3.9.15 up to 3.9.15-p8+tuxcare, plus listed versions
3.9.15-p1+tuxcare3.9.15-p2+tuxcare3.9.15-p3+tuxcare3.9.15-p4+tuxcare3.9.15-p5+tuxcare3.9.15-p6+tuxcare3.9.15-p7+tuxcare
3.9.15-p8+tuxcare
craftcms/cms
Packagist
5.0.0-alpha.1 up to 5.4.9, plus listed versions
5.0.05.0.0-RC15.0.0-alpha.105.0.0-alpha.115.0.0-alpha.12
Show 45 moreShow less
5.0.0-alpha.135.0.0-alpha.25.0.0-alpha.35.0.0-alpha.45.0.0-alpha.55.0.0-alpha.65.0.0-alpha.75.0.0-alpha.85.0.0-alpha.95.0.0-beta.15.0.0-beta.105.0.0-beta.115.0.0-beta.25.0.0-beta.35.0.0-beta.45.0.0-beta.55.0.0-beta.65.0.0-beta.75.0.0-beta.85.0.0-beta.95.0.15.0.25.0.35.0.45.0.55.0.65.1.05.1.15.1.105.1.25.1.35.1.45.1.55.1.65.1.75.1.85.1.95.2.05.2.0-beta.15.2.0-beta.25.2.0-beta.35.2.0-beta.45.2.0-beta.55.2.0-beta.65.2.1
5.4.9
craftcms/cms
Packagist
3.5.13 up to 4.12.8, plus listed versions
3.5.13.13.5.13.23.5.143.5.153.5.15.1
Show 45 moreShow less
3.5.163.5.173.5.17.13.5.183.5.193.5.19.13.6.03.6.0-RC13.6.0-RC23.6.0-RC2.13.6.0-RC33.6.0-RC43.6.0-beta.13.6.0-beta.1.13.6.0-beta.23.6.0.13.6.13.6.103.6.113.6.11.13.6.11.23.6.123.6.12.13.6.133.6.143.6.153.6.163.6.173.6.183.6.23.6.33.6.43.6.4.13.6.53.6.5.13.6.63.6.73.6.83.6.93.7.03.7.0-beta.13.7.0-beta.23.7.0-beta.33.7.0-beta.43.7.0-beta.5
4.12.8

History

History
RecordedChangedSources
aliases, productsEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-52292 is a high vulnerability (CVSS 7.7) in Craftcms Cms, published November 13, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.75%, the 55th percentile. Fixed in craftcms/cms 5.4.9.

References

This page doesn't list everything

Left out here: 329 versions. The JSON record has them.

MoveEnter Open