CVE-2023-42458 Zope vulnerable to Stored Cross Site Scripting with SVG images

Low 3.7 Published Updated

Attackers can inject malicious scripts via uploaded SVG images, leading to code execution when users view them.

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

CVE-2023-42458 is a low-severity cross-site scripting vulnerability in zopefoundation Zope, 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

Zope is an open-source web application server. Prior to versions 4.8.10 and 5.8.5, there is a stored cross site scripting vulnerability for SVG images. Note that an image tag with an SVG image as source is never 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 Zope 4.8.10 and 5.8.5. As a workaround, make sure the "Add Documents, Images, and Files" permission is only assigned to trusted roles. By default, only the Manager has this permission.

Weakness: CWE-80, CWE-79

Which versions are affected by CVE-2023-42458?

5 open source packages ship an affected version, including zope and Zope. It affects 1 product.

PackageAffectedFixed in
zope PyPIAll versions4.8.10, 5.8.5
zope PyPIAll versions4.8.10
zope PyPIFrom 5.8.05.8.5
Zope PyPIAll versions4.8.10
Zope PyPIFrom 5.8.05.8.5

Products include Zope Zope.

How do I fix CVE-2023-42458?

Upgrade zope to a fixed version for your release line: 4.8.10 or 5.8.5.

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

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

Sources

Also known as GHSA-wm8q-9975-xh5v, PYSEC-2026-2077.

Is CVE-2023-42458 in your software?

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

Check your SBOMs for free