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
36 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. 25 new CWE-176 CVEs have been recorded so far in 2026 (2 in 2025).
- CVE-2024-43093CISA KEVHigh · CVSS 7.0 · EPSS 54th2024-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 50th2026-03-19 - CVE-2024-24691
Zoom Desktop Client for Windows, Zoom VDI Client for Windows, and Zoom Meeting SDK for Windows - Improper Input Validation
Critical · CVSS 9.8 · EPSS 77th2024-02-14 - CVE-2023-39213Critical · CVSS 9.8 · EPSS 73th2023-08-08
- CVE-2025-71316
SQLite sqldiff remote code execution via argument injection
Critical · CVSS 9.2 · EPSS 46th2026-06-04 - CVE-2026-89074
MOVEit Transfer Email MFA Bypass
High · CVSS 8.8 · EPSS 42th2026-10-14 - CVE-2026-23950
node-tar has Race Condition in Path Reservations via Unicode Ligature Collisions on macOS APFS
High · CVSS 8.8 · EPSS 18th2026-01-20 - CVE-2026-93990
Expat before 2.8.5 Malformed UTF-16 Acceptance via Unchecked Surrogate
High · CVSS 8.7 · EPSS 35th2026-09-19 - CVE-2026-48618
A flaw in Node.js TLS hostname handling can cause Node.js unicode dot separator handling can lead...
High · CVSS 7.7 · EPSS 88th2026-06-26 - CVE-2026-110687
Cpanel::JSON::XS versions from 4.43 before 4.80 for Perl misorder byte-string keys during canonical encoding in utf16_cmp
High · CVSS 7.5 · EPSS 37th2026-10-19 - 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 38th2026-04-27 - CVE-2026-4116High · CVSS 7.2 · EPSS 37th2026-04-09
Showing 12 of 36 recorded CWE-176 CVEs. Get an alert for each new one, with AI-written analysis and fixes.
Monitor these CVEsCommon 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
MITRE examples of the weakness 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){
WCHAR unicodeUser[UNLEN+1];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?
- 36 recorded CVEs are attributed to CWE-176, including CVE-2024-43093, CVE-2006-10002 and CVE-2024-24691. 1 is 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 vulnerability is in CISA's KEV catalog of actively exploited flaws, out of 36 recorded CVEs.
Sources
- [1]The Art of Software Security Assessment (2006)
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.
Track CWE-176 CVEs
Get an alert when a new CWE-176 CVE affects your products, with AI-written analysis and remediation steps.