CVE-2026-71864: Unsafe Template Literal Quote Replacement

Naively replacing quotes with backticks without escaping backslashes, backticks, or interpolation expressions (${...}) allows template literal injection when generating code. Use a secure escaping library such as 'jsesc' with backtick options instead.

Provally CuratedPublic repositoryMediumHigh confidenceVerifiedApache-2.0JS
greprules fetch cve-2026-71864-unsafe-template-literal-quote-replacement --engine opengrep

Description

Naively replacing quotes with backticks without escaping backslashes, backticks, or interpolation expressions (${...}) allows template literal injection when generating code. Use a secure escaping library such as 'jsesc' with backtick options instead.