CWE-76: Improper Neutralization of Equivalent Special Elements

BaseDraftExploit Likelihood: High

The product correctly neutralizes certain special elements, but it improperly neutralizes equivalent special elements.

View on MITRE
Back to CWE Lookup

Extended Description

The product may have a fixed list of special characters it believes is complete. However, there may be alternate encodings, or representations that also have the same meaning. For example, the product may filter out a leading slash (/) to prevent absolute path names, but does not account for a tilde (~) followed by a user name, which on some *nix systems could be expanded to an absolute pathname. Alternately, the product might filter a dangerous "-e" command-line switch when calling an external program, but it might not account for "--exec" or other switches that have the same semantics.

Technical Details

Structure
Simple

Applicable To

Languages
Not Language-Specific
Platforms

Frequently Asked Questions

What is CWE-76: Improper Neutralization of Equivalent Special Elements?+

CWE-76: Improper Neutralization of Equivalent Special Elements is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product correctly neutralizes certain special elements, but it improperly neutralizes equivalent special elements. The product may have a fixed list of special characters it believes is complete. However, there may be alternate encodings, or representations that also have the same meaning. For example, the product may filter out a leading slash (/) to prevent absolute path names, but does not account for a tilde (~) followed by a user name, which on some *nix systems could be expanded to an absolute pathname. Alternately, the product might filter a dangerous "-e" command-line switch when calling an external program, but it might not account for "--exec" or other switches that have the same semantics.

What are the security consequences of Improper Neutralization of Equivalent Special Elements?+

If exploited, CWE-76 (Improper Neutralization of Equivalent Special Elements) it can compromise Other, leading to outcomes such as Other.

How do you prevent or mitigate Improper Neutralization of Equivalent Special Elements?+

Recommended mitigations for CWE-76 include: Programming languages and supporting technologies might be chosen which are not subject to these issues. Utilize an appropriate mix of allowlist and denylist parsing to filter equivalent special element syntax from all input.

Which programming languages are affected by Improper Neutralization of Equivalent Special Elements?+

CWE-76 commonly affects Not Language-Specific. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.

What is the difference between a CWE and a CVE?+

A CWE (Common Weakness Enumeration) like CWE-76 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.

Learn More