statamic/cms

CVE-2023-36828

CVE-2023-36828 is a medium-severity cross-site scripting (XSS) vulnerability in statamic/cms (composer), affecting versions < 4.10.0. It is fixed in 4.10.0.

Key facts
CVSS score
5.5
Medium
Attack vector
Network
Issuing authority
GitHub Advisory Database
Affected package
statamic/cms
Fixed in
4.10.0
Disclosed
2023

Summary

Antlers sanitizer cannot effectively sanitize malicious SVG Summary The SVG tag does not sanitize malicious SVG. Therefore, an attacker can exploit this vulnerability to perform XSS attacks using SVG, even when using the sanitize function. Details Regarding the previous discussion mentioned here, it has been identified that the default blacklist in the FilesFieldtypeController (located at this link) only blocks certain file extensions such as php, php3, php4, php5, and phtml. This allows a malicious user to upload a manipulated SVG file disguised as a social media icon, potentially triggering an XSS vulnerability. PoC Screenshot PoC Create new Global set, let's say "Settings" Create a "Grid" field in Blueprint (named: social), then add somefields Name (text), URL (text) and Icon (Assets) in the section Fields. When calling the social setting in the _footer.antlers.html, remember to sanitize Upload the malicious SVG image, here is the code: Impact Since the social media icon is displayed in the footer layout, any user can view it, potentially leading to the execution of XSS. Suggestions to Mitigate or Resolve the Issue: Sanitize when outputing the svg. This vulnerability caused by unsanitized File::get() when retrieving the SVG, it is crucial to sanitize the SVG when outputting it. The issue can be found in the following file: https://github.com/statamic/cms/blob/f806b6b007ddcf066082eef175653c5beaa96d60/src/Tags/Svg.php#L36-L40. It is highly recommended to implement proper sanitization measures to ensure the security of the SVG content. One effective approach is to utilize a reliable package, such as https://github.com/darylldoyle/svg-sanitizer ,which provides comprehensive SVG sanitization capabilities. So the code becomes: Reference https://github.com/gogs/gogs/security/advisories/GHSA-ff28-f46g-r9g8 https://huntr.dev/bounties/34a12146-3a5d-4efc-a0f8-7a3ae04b198d/ https://blog.nintechnet.com/wordpress-elementor-plugin-fixed-svg-xss-protection-bypass-vulnerability/

Impact

What is cross-site scripting (XSS)?

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

Severity and exposure

CVE-2023-36828 has a CVSS score of 5.5 (Medium). The vector is network-reachable, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.

A fixed version is available (4.10.0). Upgrading removes the vulnerable code path.

Affected versions

composer

  • statamic/cms (< 4.10.0)

Security releases

  • statamic/cms → 4.10.0 (composer)
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether CVE-2023-36828 is reachable in your applications. Explore open-source security for your team.

See if CVE-2023-36828 is reachable in your applications. Get a demo

Already deployed Kodem? See CVE-2023-36828 in your environment

Remediation advice

Upgrade statamic/cms to 4.10.0 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2023-36828

What is CVE-2023-36828?

CVE-2023-36828 is a medium-severity cross-site scripting (XSS) vulnerability in statamic/cms (composer), affecting versions < 4.10.0. It is fixed in 4.10.0. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.

How severe is CVE-2023-36828?

CVE-2023-36828 has a CVSS score of 5.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.

Which versions of statamic/cms are affected by CVE-2023-36828?

statamic/cms (composer) versions < 4.10.0 is affected.

Is there a fix for CVE-2023-36828?

Yes. CVE-2023-36828 is fixed in 4.10.0. Upgrade to this version or later.

Is CVE-2023-36828 exploitable, and should I be worried?

Whether CVE-2023-36828 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2023-36828 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2023-36828?

Upgrade statamic/cms to 4.10.0 or later.

Stop the waste.
Protect your environment with Kodem.