CVE-2026-33335: Double Escape Before Goldmark

Data is explicitly HTML-escaped using a function like `$PKG.HTMLEscapeString` before being evaluated by the Goldmark Markdown parser. This causes correct HTML entities provided as input to be double-escaped in the output, leading to data degradation. Pass raw text to Goldmark instead and apply an HTML sanitizer to its output.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-33335-double-escape-before-goldmark --engine opengrep

Description

Data is explicitly HTML-escaped using a function like `$PKG.HTMLEscapeString` before being evaluated by the Goldmark Markdown parser. This causes correct HTML entities provided as input to be double-escaped in the output, leading to data degradation. Pass raw text to Goldmark instead and apply an HTML sanitizer to its output.