CVE-2024-22048 govuk_tech_docs XSS Vulnerability
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.
| Package | Affected | Fixed in |
|---|---|---|
govuk_tech_docs RubyGems | From 2.0.2 | 3.3.1 |
govuk_tech_docs RubyGems | From 2.0.2 | 3.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.