CVE-2021-3785 Cross-site Scripting (XSS) - Stored in yourls/yourls

High 8.8 Published Updated

An attacker can inject malicious scripts into the Yourls URL shortener, potentially executing code or hijacking user sessions.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-3785?

CVE-2021-3785 is a high-severity cross-site scripting vulnerability in yourls/yourls, published on 15 Sep 2021. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

yourls is vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Weakness: CWE-79

Which versions are affected by CVE-2021-3785?

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

PackageAffectedFixed in
yourls/yourls PackagistAll versions1.8.2
yourls/yourls PackagistAll versions1.8.2

Products include Yourls Yourls.

How do I fix CVE-2021-3785?

Upgrade yourls/yourls to 1.8.2 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-3785 being exploited?

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

Sources

Also known as GHSA-m9fq-c9hp-59g7.

Is CVE-2021-3785 in your software?

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

Check your SBOMs for free