CVE-2023-41048 plone.namedfile vulnerable to Stored Cross Site Scripting with SVG images

Low 3.7 Published Updated

Stored XSS in plone.namedfile allows attackers to execute scripts via crafted SVG image scales, requiring user interaction.

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-41048?

CVE-2023-41048 is a low-severity cross-site scripting vulnerability in plone.namedfile, published on 21 Sep 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

plone.namedfile allows users to handle `File` and `Image` fields targeting, but not depending on, Plone Dexterity content. Prior to versions 5.6.1, 6.0.3, 6.1.3, and 6.2.1, there is a stored cross site scripting vulnerability for SVG images. A security hotfix from 2021 already partially fixed this by making sure SVG images are always downloaded instead of shown inline. But the same problem still exists for scales of SVG images. Note that an image tag with an SVG image as source is not vulnerable, even when the SVG image contains malicious code. To exploit the vulnerability, an attacker would first need to upload an image, and then trick a user into following a specially crafted link. Patches are available in versions 5.6.1 (for Plone 5.2), 6.0.3 (for Plone 6.0.0-6.0.4), 6.1.3 (for Plone 6.0.5-6.0.6), and 6.2.1 (for Plone 6.0.7). There are no known workarounds.

Weakness: CWE-80, CWE-79

Which versions are affected by CVE-2023-41048?

9 open source packages ship an affected version, including plone.namedfile and plone-namedfile. It affects 1 product.

PackageAffectedFixed in
plone.namedfile PyPIAll versions5.6.1
plone.namedfile PyPIFrom 6.0.06.0.3
plone.namedfile PyPIFrom 6.1.06.1.3
plone.namedfile PyPIFrom 6.2.06.2.1
plone-namedfile PyPIAll versions5.6.1, 6.0.3, 6.1.3
plone-namedfile PyPIAll versions5.6.1
3 more packages
plone-namedfile PyPIFrom 6.0.06.0.3
plone-namedfile PyPIFrom 6.1.06.1.3
plone-namedfile PyPIFrom 6.2.06.2.1

Products include Plone Namedfile.

How do I fix CVE-2023-41048?

Upgrade plone.namedfile to a fixed version for your release line: 5.6.1, 6.0.3, 6.1.3 or 6.2.1.

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-41048 being exploited?

There is no known exploitation of CVE-2023-41048 in the wild and no public exploit code.

Sources

Also known as GHSA-jj7c-jrv4-c65x, PYSEC-2023-311.

Is CVE-2023-41048 in your software?

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

Check your SBOMs for free