Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CWE-176 (Unicode编码处理不恰当) — Vulnerability Class 33

33 vulnerabilities classified as CWE-176 (Unicode编码处理不恰当). AI Chinese analysis included.

CWE-176 represents an input validation weakness where software fails to correctly process or normalize Unicode-encoded data, leading to inconsistent interpretation across different system components. Attackers typically exploit this by crafting malicious inputs containing mixed encoding schemes or invalid sequences, which can bypass security filters, trigger buffer overflows, or cause unexpected application crashes. This inconsistency often arises when one layer of the application stack interprets the input differently than another, such as a web server versus a database. To mitigate this risk, developers must enforce strict input validation and normalization strategies, ensuring that all Unicode data is consistently decoded and standardized before processing. Utilizing robust, well-tested libraries for character encoding and explicitly defining expected character sets helps prevent these ambiguities, thereby securing the application against encoding-based attacks.

MITRE CWE Description
The product does not properly handle when an input contains Unicode encoding.
Common Consequences (1)
Integrity Unexpected State
Mitigations (3)
Architecture and Design Avoid making decisions based on names of resources (e.g. files) if those resources can have alternate names.
Implementation 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…
Implementation 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.
Examples (1)
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.
void getUserInfo(char *username, struct _USER_INFO_2 info){ WCHAR unicodeUser[UNLEN+1]; MultiByteToWideChar(CP_ACP, 0, username, -1, unicodeUser, sizeof(unicodeUser)); NetUserGetInfo(NULL, unicodeUser, 2, (LPBYTE *)&info); }
Bad · C
CVE ID Title CVSS Severity Published
CVE-2023-39213 Zoom Client 注入漏洞 — Zoom Desktop Client for Windows and Zoom VDI Client 9.6 Critical 2023-08-08
CVE-2022-29812 JetBrains IntelliJ IDEA 安全漏洞 — IntelliJ IDEA 2.3 Low 2022-04-28
CVE-2020-8929 Ciphertext integrity weakness in Tink — Tink 5.3 Medium 2020-10-19

Vulnerabilities classified as CWE-176 (Unicode编码处理不恰当) represent 33 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.