CVE-2021-25978 Apostrophe - XSS

Medium 5.4 Published Updated

Attackers can execute arbitrary JavaScript in victim browsers by uploading malicious SVG files to the Apostrophe CMS Images module.

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-2021-25978?

CVE-2021-25978 is a medium-severity cross-site scripting vulnerability in Apostrophe , published on 7 Nov 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

Apostrophe CMS versions between 2.63.0 to 3.3.1 are vulnerable to Stored XSS where an editor uploads an SVG file that contains malicious JavaScript onto the Images module, which triggers XSS once viewed.

Weakness: CWE-79

Which versions are affected by CVE-2021-25978?

2 open source packages ship an affected version, including apostrophe. It affects 1 product.

PackageAffectedFixed in
apostrophe npmFrom 2.63.03.4.0
apostrophe npmFrom 2.63.03.4.0

Products include Apostrophecms Apostrophecms.

How do I fix CVE-2021-25978?

Upgrade apostrophe to 3.4.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-2021-25978 being exploited?

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

Sources

Also known as GHSA-4r9c-jghc-cx5m.

Is CVE-2021-25978 in your software?

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

Check your SBOMs for free