GHSA-X2XW-HW8G-6773

Vulnerability from github – Published: 2023-04-11 15:41 – Updated: 2025-11-17 17:32
VLAI?
Summary
govuk_tech_docs vulnerable to unescaped HTML on search results page
Details

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.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "RubyGems",
        "name": "govuk_tech_docs"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.0.2"
            },
            {
              "fixed": "3.3.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2024-22048"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-79",
      "CWE-80"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-04-11T15:41:30Z",
    "nvd_published_at": null,
    "severity": "LOW"
  },
  "details": "### Impact\n\nPages 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.\n\nThis 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\u0027s 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.\n\n### Patches\n\nThis has been fixed in v3.3.1. HTML is now sanitised in search results.",
  "id": "GHSA-x2xw-hw8g-6773",
  "modified": "2025-11-17T17:32:14Z",
  "published": "2023-04-11T15:41:30Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/alphagov/tech-docs-gem/security/advisories/GHSA-x2xw-hw8g-6773"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-22048"
    },
    {
      "type": "WEB",
      "url": "https://github.com/alphagov/tech-docs-gem/pull/323"
    },
    {
      "type": "WEB",
      "url": "https://github.com/alphagov/tech-docs-gem/commit/a51c7058cec46bf2a4e25a1da62b14ac3fd46b53"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/alphagov/tech-docs-gem"
    },
    {
      "type": "WEB",
      "url": "https://github.com/alphagov/tech-docs-gem/releases/tag/v3.3.1"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/govuk_tech_docs/CVE-2024-22048.yml"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [],
  "summary": "govuk_tech_docs vulnerable to unescaped HTML on search results page"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…