CVE-2026-42538: Potentially Flawed Custom Html Escape

A potentially insecure custom function is interpolated directly into an HTML attribute value within a template literal. If this function fails to adequately escape double quotes, it enables attribute breakout and Cross-Site Scripting (XSS). Use a thoroughly tested standard library or explicitly context-aware sanitizers (e.g., filterXSS, DOMPurify).

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0JS
greprules fetch cve-2026-42538-potentially-flawed-custom-html-escape --engine opengrep

Description

A potentially insecure custom function is interpolated directly into an HTML attribute value within a template literal. If this function fails to adequately escape double quotes, it enables attribute breakout and Cross-Site Scripting (XSS). Use a thoroughly tested standard library or explicitly context-aware sanitizers (e.g., filterXSS, DOMPurify).