Lucene search

K
githubGitHub Advisory DatabaseGHSA-X2XW-HW8G-6773
HistoryApr 11, 2023 - 3:41 p.m.

govuk_tech_docs vulnerable to unescaped HTML on search results page

2023-04-1115:41:30
CWE-79
CWE-80
GitHub Advisory Database
github.com
5
vulnerable website
unsanitised search results
low risk security issue
xss exploit
social engineering
tech-docs-gem
html sanitised
v3.3.1 patch
indexing flaw
arbitrary html

6.1 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

0.001 Low

EPSS

Percentile

21.4%

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.

Affected configurations

Vulners
Node
gov.ukgovuk_tech_docsRange2.0.2ruby
OR
gov.ukgovuk_tech_docsRange<3.3.1ruby

6.1 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

0.001 Low

EPSS

Percentile

21.4%

Related for GHSA-X2XW-HW8G-6773