Security
Headlines
HeadlinesLatestCVEs

Headline

GHSA-x2xw-hw8g-6773: 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.

ghsa
#xss#git#ruby
  1. GitHub Advisory Database
  2. GitHub Reviewed
  3. GHSA-x2xw-hw8g-6773

govuk_tech_docs vulnerable to unescaped HTML on search results page

Low severity GitHub Reviewed Published Apr 11, 2023 in alphagov/tech-docs-gem • Updated Apr 11, 2023

Package

bundler govuk_tech_docs (RubyGems)

Affected versions

>= 2.0.2, < 3.3.1

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.

References

  • GHSA-x2xw-hw8g-6773
  • alphagov/tech-docs-gem#323
  • https://github.com/alphagov/tech-docs-gem/releases/tag/v3.3.1

Published to the GitHub Advisory Database

Apr 11, 2023

Last updated

Apr 11, 2023

ghsa: Latest News

GHSA-27wf-5967-98gx: Kubernetes kubelet arbitrary command execution