---
id: CVE-2024-22048
title: >-
  govuk_tech_docs versions from 2.0.2 to before 3.3.1 are vulnerable to a
  cross-site scripting vulnerability
summary: >-
  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.
severity: medium
cvss: 6.1
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'
cwe:
  - CWE-79
  - CWE-79
  - CWE-79
vendor: gov.uk
product: govuk_tech_docs
affected:
  - 'govuk_tech_docs >= 2.0.2, < 3.3.1'
patched:
  - govuk_tech_docs 3.3.1
published: '2024-01-04'
updated: '2026-07-14'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2024-22048'
references:
  - url: 'https://github.com/advisories/GHSA-x2xw-hw8g-6773'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/alphagov/tech-docs-gem/pull/323'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/alphagov/tech-docs-gem/releases/tag/v3.3.1'
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/alphagov/tech-docs-gem/security/advisories/GHSA-x2xw-hw8g-6773
    label: disclosure@vulncheck.com
  - url: 'https://vulncheck.com/advisories/vc-advisory-GHSA-x2xw-hw8g-6773'
    label: disclosure@vulncheck.com
  - url: 'https://github.com/advisories/GHSA-x2xw-hw8g-6773'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/alphagov/tech-docs-gem/pull/323'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://github.com/alphagov/tech-docs-gem/releases/tag/v3.3.1'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://github.com/alphagov/tech-docs-gem/security/advisories/GHSA-x2xw-hw8g-6773
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://vulncheck.com/advisories/vc-advisory-GHSA-x2xw-hw8g-6773'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
epss: 0.00504
epssPercentile: 0.40468
ingestedAt: '2026-07-14T23:40:04.592Z'
---

## Overview

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.

## Affected

- `govuk_tech_docs >= 2.0.2, < 3.3.1`

## Remediation

Upgrade past the affected range:

- `govuk_tech_docs 3.3.1`
