CVE-2023-36828 Statamic's Antlers sanitizer cannot effectively sanitize malicious SVG

Medium 5.5 Published Updated

Attackers can execute cross-site scripting attacks via malicious SVGs in Statamic CMS, bypassing the sanitizer function.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2023-36828?

CVE-2023-36828 is a medium-severity cross-site scripting vulnerability in statamic cms, published on 5 Jul 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

Statamic is a flat-first, Laravel and Git powered content management system. Prior to version 4.10.0, the SVG tag does not sanitize malicious SVG. Therefore, an attacker can exploit this vulnerability to perform cross-site scripting attacks using SVG, even when using the `sanitize` function. Version 4.10.0 contains a patch for this issue.

Weakness: CWE-79

Which versions are affected by CVE-2023-36828?

2 open source packages ship an affected version, including statamic/cms. It affects 1 product.

PackageAffectedFixed in
statamic/cms PackagistAll versions4.10.0
statamic/cms PackagistAll versions4.10.0

Products include Statamic Statamic.

How do I fix CVE-2023-36828?

Upgrade statamic/cms to 4.10.0 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2023-36828 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-36828 exists.

Sources

Also known as GHSA-6r5g-cq4q-327g.

Is CVE-2023-36828 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free