CVE-2025-27600: Flawed Json Escape Regex
The code uses a flawed negative lookbehind regex (`/(?<!\\)"/g`) to escape double quotes for JSON string substitution. This fails to correctly escape user input when an explicitly escaped backslash is provided (e.g., `\\"`), allowing an attacker to break out of JSON string boundaries and inject arbitrary object properties. Use `JSON.stringify(val).slice(1, -
greprules fetch cve-2025-27600-flawed-json-escape-regex --engine opengrepDescription
The code uses a flawed negative lookbehind regex (`/(?<!\\)"/g`) to escape double quotes for JSON string substitution. This fails to correctly escape user input when an explicitly escaped backslash is provided (e.g., `\\"`), allowing an attacker to break out of JSON string boundaries and inject arbitrary object properties. Use `JSON.stringify(val).slice(1, -
Community feedback
0 signals from signed-in users.
- Useful
- 0
- False positive
- 0
- Metadata
- 0