GHSA-c97m-vxhj-p7j6

Suggest an improvement
Source
https://github.com/advisories/GHSA-c97m-vxhj-p7j6
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-c97m-vxhj-p7j6/GHSA-c97m-vxhj-p7j6.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-c97m-vxhj-p7j6
Aliases
  • CVE-2026-5160
Published
2026-04-17T15:31:17Z
Modified
2026-04-18T01:19:39.680319Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
  • 5.1 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N CVSS Calculator
Summary
goldmark vulnerable to Cross-site Scripting (XSS)
Details

Versions of the package github.com/yuin/goldmark/renderer/html before 1.7.17 are vulnerable to Cross-site Scripting (XSS) due to improper ordering of URL validation and normalization. The renderer validates link destinations using a prefix-based check (IsDangerousURL) before resolving HTML entities. This allows an attacker to bypass protocol filtering by encoding dangerous schemes using HTML5 named character references. For example, a payload such as javascript:alert(1) is not recognized as dangerous during validation, leading to arbitrary script execution in the context of applications that render the URL.

Database specific
{
    "cwe_ids": [
        "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-04-18T01:02:42Z",
    "nvd_published_at": "2026-04-15T06:16:13Z",
    "severity": "MODERATE"
}
References

Affected packages

Go / github.com/yuin/goldmark/renderer/html

Package

Name
github.com/yuin/goldmark/renderer/html
View open source insights on deps.dev
Purl
pkg:golang/github.com/yuin/goldmark/renderer/html

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.7.17

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-c97m-vxhj-p7j6/GHSA-c97m-vxhj-p7j6.json"