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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CWE-187 (部分比较) — Vulnerability Class 16

16 vulnerabilities classified as CWE-187 (部分比较). AI Chinese analysis included.

CWE-187, Partial String Comparison, is a logic flaw where software validates input by examining only a subset of a string rather than the entire value. This weakness typically enables attackers to bypass security controls, such as authentication mechanisms, by providing a short input that matches a prefix or substring of the correct credential. For instance, a user might gain access by entering just the first few characters of a password if the system checks only that portion. To prevent this vulnerability, developers must ensure that all string comparisons are performed against the complete input data. Implementing strict equality checks that require the entire string to match, rather than relying on partial matches or substring searches, effectively mitigates this risk and ensures robust validation of sensitive data.

MITRE CWE Description
The product performs a comparison that only examines a portion of a factor before determining whether there is a match, such as a substring, leading to resultant weaknesses. For example, an attacker might succeed in authentication by providing a small password that matches the associated portion of the larger, correct password.
Common Consequences (1)
Integrity, Access Control Alter Execution Logic, Bypass Protection Mechanism
Mitigations (1)
Testing Thoroughly test the comparison scheme before deploying code into production. Perform positive testing as well as negative testing.
Examples (1)
This example defines a fixed username and password. The AuthenticateUser() function is intended to accept a username and a password from an untrusted user, and check to ensure that it matches the username and password. If the username and password match, AuthenticateUser() is intended to indicate that authentication succeeded.
/* Ignore CWE-259 (hard-coded password) and CWE-309 (use of password system for authentication) for this example. */ char *username = "admin"; char *pass = "password"; int AuthenticateUser(char *inUser, char *inPass) { if (strncmp(username, inUser, strlen(inUser))) { logEvent("Auth failure of username using strlen of inUser"); return(AUTH_FAIL); } if (! strncmp(pass, inPass, strlen(inPass))) { logEvent("Auth success of password using strlen of inUser"); return(AUTH_SUCCESS); } else { logEvent("Auth fail of password using sizeof"); return(AUTH_FAIL); } } int main (int argc, char **argv) { int a
Bad · C
p pa pas pass
Attack
CVE ID Title CVSS Severity Published
CVE-2026-112266 SGLang through 0.5.22 Cross-Request Abort via rid Prefix Matching — sglang 5.9 Medium 2026-10-19
CVE-2026-94576 Brocade Fabric OS权限提升漏洞 — Fabric OS 5.9 Medium 2026-10-08
CVE-2026-101914 @grpc/grpc-js: The exact path match matcher incorrectly only applies a prefix match for case-insensitive matches — grpc-node 6.5 Medium 2026-09-28
CVE-2026-81479 Dell OpenManage 11.1.0.3前拒绝服务漏洞 — OpenManage Server Administrator Managed Node (Patch) for Windows 5.8 Medium 2026-09-17
CVE-2026-87853 Sssd: sssd: idp authentication prefix comparison allows cross-user impersonation — Red Hat Enterprise Linux 10 7.5 High 2026-09-09
CVE-2026-84376 Astro: Authorization bypass from missing path-segment boundary check when stripping the configured base — astro 6.3 Medium 2026-09-02
CVE-2026-62750 Windows HTTP Protocol Stack Tampering Vulnerability — Windows 10 Version 1607 6.5 Medium 2026-08-11
CVE-2026-14687 666ghj BettaFish InsightEngine search-result Deduplication agent.py _deduplicate_results partial string comparison — BettaFish 5.3 Medium 2026-07-05
CVE-2026-45692 Caddy: Remote Admin Authorization Bypass in `/config` API via Array Index Normalization — caddy 5.4 Medium 2026-06-23
CVE-2026-44837 view_component: System Test Entry Point Path Check Allows Sibling Directory Escape — view_component 5.9 Medium 2026-05-26
CVE-2026-34785 Rack: Local file inclusion in `Rack::Static` via URL Prefix Matching — rack 7.5 High 2026-04-02
CVE-2026-30874 OpenWrt procd PATH Environment Variable Filter Bypass via Incorrect String Comparison Leads to Privilege Escalation — openwrt 8.8 - 2026-03-19
CVE-2025-23384 Siemens RUGGEDCOM和Siemens SCALANCE 缓冲区错误漏洞 — RUGGEDCOM RM1224 LTE(4G) EU 3.7 Low 2025-03-11
CVE-2024-41110 Moby authz zero length regression — moby 10.0 Critical 2024-07-24
CVE-2024-39742 IBM MQ Container authentication bypass — MQ Operator 8.1 High 2024-07-08
CVE-2022-31802 Partial string comparison in CODESYS gateway server — CODESYS Gateway Server V2 9.8 Critical 2022-06-24

Vulnerabilities classified as CWE-187 (部分比较) represent 16 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.