CWE-176: Improper Handling of Unicode Encoding
The product does not properly handle when an input contains Unicode encoding.
Last updated
Overview
CWE-176 (Improper Handling of Unicode Encoding) is a variant-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Real-world CVEs
26 recorded CVEs are caused by CWE-176 (Improper Handling of Unicode Encoding), including 1 in CISA's KEV (Known Exploited Vulnerabilities) catalog. KEVs are shown first. 15 new CWE-176 CVEs have been recorded so far in 2026 (2 in 2025).
- CVE-2024-43093CISA KEVHigh · CVSS 7.0 · EPSS 51th2024-11-13
- CVE-2006-10002
XML::Parser versions through 2.45 for Perl could overflow the pre-allocated buffer size cause a heap corruption (double free or corruption) and crashes
Critical · CVSS 9.8 · EPSS 46th2026-03-19 - CVE-2024-24691Critical · CVSS 9.8 · EPSS 75th2024-02-14
- CVE-2023-39213Critical · CVSS 9.8 · EPSS 71th2023-08-08
- CVE-2025-71316
SQLite sqldiff remote code execution via argument injection
Critical · CVSS 9.2 · EPSS 31th2026-06-04 - CVE-2026-23950
node-tar has Race Condition in Path Reservations via Unicode Ligature Collisions on macOS APFS
High · CVSS 8.8 · EPSS 14th2026-01-20 - CVE-2026-48618High · CVSS 7.7 · EPSS 87th2026-06-26
- CVE-2026-7040
Text::Minify::XS versions from 0.3.0 before 0.7.8 for Perl have heap overflow when processing some malformed UTF-8 characters
High · CVSS 7.5 · EPSS 36th2026-04-27 - CVE-2026-4116High · CVSS 7.2 · EPSS 35th2026-04-09
- CVE-2020-8929Medium · CVSS 6.9 · EPSS 38th2020-10-19
- CVE-2026-20202
Improper Input Validation during User Account Creation in Splunk Enterprise
Medium · CVSS 6.6 · EPSS 16th2026-04-15 - CVE-2026-25480
FileStore key canonicalization collisions allow response cache mixup/poisoning (ASCII ord + Unicode NFKD)
Medium · CVSS 6.5 · EPSS 34th2026-02-09
Showing 12 of 26 recorded CWE-176 CVEs. Track new ones as they are published and get AI-written analysis and fixes.
Monitor CWE-176 vulnerabilitiesCommon consequences
What can happen when CWE-176 is exploited.
Unexpected State
Affects: Integrity
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to prevent it
Practical mitigations for CWE-176, grouped by where in the lifecycle they apply.
Avoid making decisions based on names of resources (e.g. files) if those resources can have alternate names.
Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
Code examples
Illustrative examples from MITRE showing how the weakness appears in code.
Windows provides the MultiByteToWideChar(), WideCharToMultiByte(), UnicodeToBytes(), and BytesToUnicode() functions to convert between arbitrary multibyte (usually ANSI) character strings and Unicode (wide character) strings. The size arguments to these functions are specified in different units, (one in bytes, the other in characters) making their use prone to error.
Vulnerable example
void getUserInfo(char *username, struct _USER_INFO_2 info){Illustrative examples
Real CVEs that MITRE cites as examples of this weakness.
- CVE-2000-0884 — Server allows remote attackers to read documents outside of the web root, and possibly execute arbitrary commands, via malformed URLs that contain Unicode encoded characters.
- CVE-2001-0709 — Server allows a remote attacker to obtain source code of ASP files via a URL encoded with Unicode.
- CVE-2001-0669 — Overlaps interaction error.
Terminology & mappings
Mapped taxonomies
- PLOVER: Unicode Encoding
- CERT C Secure Coding: Character Encoding - UTF8 Related Issues (MSC10-C)
Attack patterns
CAPEC attack patterns that exploit this weakness.
Frequently asked questions
Common questions about CWE-176.
- What is CWE-176?
- The product does not properly handle when an input contains Unicode encoding.
- What CVEs are caused by CWE-176?
- 26 recorded CVEs are attributed to CWE-176, including CVE-2024-43093, CVE-2006-10002, CVE-2024-24691. 1 are listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.
- How do you prevent CWE-176?
- Avoid making decisions based on names of resources (e.g. files) if those resources can have alternate names.
- What are the consequences of CWE-176?
- Exploiting CWE-176 can lead to: Unexpected State.
- Is CWE-176 actively exploited?
- Yes. 1 CWE-176 vulnerabilities are in CISA's KEV catalog of actively exploited flaws, out of 26 recorded CVEs.
References
- MITRE CWE definition (CWE-176) (opens in a new tab)
- CWE-176 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Stay ahead of CWE-176
Get alerted the moment a new CWE-176 vulnerability affects your stack, with AI-written analysis, severity context, and remediation guidance.