Every CVE Search/ Get API key

CVE-2024-22048

govuk_tech_docs XSS Vulnerability

6.1 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
None

Exploit likelihood

0.50%Up 0.5 points since Jan 18, 2024
90%50%10%1%

What each source reports

NVD Score used 6.1

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.

Record
CVE-2024-22048
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
CVE List 6.1

govuk_tech_docs XSS Vulnerability

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.

Record
CVE-2024-22048
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79, CWE-79
Updated
2026-11-08
EUVDEUVD-2023-1419 6.1

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.

Record
EUVD-2023-1419
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-08
GitHub AdvisoriesGHSA-x2xw-hw8g-6773 No score

govuk_tech_docs vulnerable to unescaped HTML on search results page

Impact

Pages that are indexed in search results have their entire contents indexed, including any HTML code snippets. These HTML snippets would appear in the search results unsanitised, so it was possible to render arbitrary HTML or run arbitrary scripts.

This is a low risk security issue; to exploit it, an attacker would need to find a way of committing malicious code to a page indexed by a site that uses tech-docs-gem (which are typically not editable by untrusted users). Their code would also be limited by the relatively short length that's rendered in the corresponding search result. Nevertheless, the XSS would then be triggerable by visiting a pre-constructed URL (/search/index.html?q=some+search+term), which users could be tricked into clicking on through social engineering.

Patches

This has been fixed in v3.3.1. HTML is now sanitised in search results.

Record
GHSA-x2xw-hw8g-6773
Weakness
CWE-79, CWE-80
Updated
2026-11-02
OSV 6.1

govuk_tech_docs XSS Vulnerability

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.

Record
CVE-2024-22048
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-09
OSVGHSA-x2xw-hw8g-6773 No score

govuk_tech_docs vulnerable to unescaped HTML on search results page

Impact

Pages that are indexed in search results have their entire contents indexed, including any HTML code snippets. These HTML snippets would appear in the search results unsanitised, so it was possible to render arbitrary HTML or run arbitrary scripts.

This is a low risk security issue; to exploit it, an attacker would need to find a way of committing malicious code to a page indexed by a site that uses tech-docs-gem (which are typically not editable by untrusted users). Their code would also be limited by the relatively short length that's rendered in the corresponding search result. Nevertheless, the XSS would then be triggerable by visiting a pre-constructed URL (/search/index.html?q=some+search+term), which users could be tricked into clicking on through social engineering.

Patches

This has been fixed in v3.3.1. HTML is now sanitised in search results.

Record
GHSA-x2xw-hw8g-6773
Weakness
CWE-79, CWE-80
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
govuk_tech_docs
RubyGems
2.0.2 up to 3.3.1
3.3.1
govuk_tech_docs
RubyGems
2.0.2 up to 3.3.1, plus listed versions
2.0.102.0.112.0.122.0.132.0.3
Show 22 moreShow less
2.0.42.0.52.0.62.0.72.0.82.0.92.1.02.1.12.2.02.2.12.2.22.3.02.4.02.4.12.4.22.4.33.0.03.0.13.1.03.2.03.2.13.3.0
3.3.1

History

History
RecordedChangedSources
referencesEUVD, OSV
facts, referencesCVE List
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-22048 is a medium vulnerability (CVSS 6.1) in Gov.uk Govuk Tech Docs, published April 11, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.50%, the 43rd percentile. Fixed in govuk_tech_docs 3.3.1.

References

Show 5 moreShow less
MoveEnter Open