This vulnerability occurs when an application fails to properly sanitize or escape special characters that act as delimiters for variable names before passing data to another component. Attackers can inject these delimiters to manipulate how variables are interpreted.
When an application processes user-supplied data, characters like dollar signs ($), percent signs (%), or braces {} are often used to denote variable names. If the software doesn't filter these delimiter characters, an attacker can inject them to alter the intended variable resolution. This can force the system to read, write, or execute code based on attacker-controlled variable names, leading to data exposure, privilege escalation, or remote code execution. To prevent this, always validate and sanitize input by escaping or removing special delimiter characters before using data in contexts that interpret variables. Implement strict allow-lists for acceptable characters in variable names and use parameterized interfaces or safe template engines that automatically handle delimiter neutralization. Regular security testing should include attempts to inject common delimiters to verify proper handling.
Impact: Unexpected State
Strategy: Input Validation
Strategy: Output Encoding
Strategy: Input Validation