CVE-2024-22048 govuk_tech_docs XSS Vulnerability

Medium 6.1 Published Updated

Attackers can execute malicious JavaScript in users' browsers via crafted search results in the govuk_tech_docs Ruby library.

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

What is CVE-2024-22048?

CVE-2024-22048 is a medium-severity cross-site scripting vulnerability in gov.uk:govuk_tech_docs, published on 4 Jan 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

govuk_tech_docs versions from 2.0.2 to before 3.3.1 are vulnerable to a cross-site scripting vulnerability. Malicious JavaScript may be executed in the user's browser if a malicious search result is displayed on the search page.

Weakness: CWE-79

Which versions are affected by CVE-2024-22048?

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

PackageAffectedFixed in
govuk_tech_docs RubyGemsFrom 2.0.23.3.1
govuk_tech_docs RubyGemsFrom 2.0.23.3.1

Products include Gov.uk Govuk Tech Docs.

How do I fix CVE-2024-22048?

Upgrade govuk_tech_docs to 3.3.1 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-2024-22048 being exploited?

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

Sources

Also known as GHSA-x2xw-hw8g-6773.

Is CVE-2024-22048 in your software?

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

Check your SBOMs for free