4 vulnerabilities classified as CWE-784 (在安全决策中依赖未经验证和完整性检查的Cookie). AI Chinese analysis included.
CWE-784 represents a critical security weakness where applications trust client-side cookies for sensitive decisions without verifying their integrity or authenticity. Attackers typically exploit this flaw by manipulating cookie values, such as altering session identifiers or privilege flags, to bypass authentication and authorization controls. Since cookies are easily modified by users or malicious scripts, relying on them as a sole security mechanism allows adversaries to impersonate legitimate users or escalate privileges. To mitigate this risk, developers must implement server-side validation for all cookie data, ensuring it matches expected formats and user contexts. Additionally, employing cryptographic signatures, such as HMACs, and using secure, HttpOnly flags helps prevent tampering and theft. Ultimately, security decisions should never depend solely on client-side storage, requiring robust backend verification to maintain system integrity.
Cookie[] cookies = request.getCookies(); for (int i =0; i< cookies.length; i++) { Cookie c = cookies[i]; if (c.getName().equals("role")) { userRole = c.getValue(); } }$auth = $_COOKIES['authenticated']; if (! $auth) { if (AuthenticateUser($_POST['user'], $_POST['password']) == "success") { // save the cookie to send out in future responses setcookie("authenticated", "1", time()+60*60*2); } else { ShowLoginScreen(); die("\n"); } } DisplayMedicalHistory($_POST['patient_ID']);| CVE ID | Title | CVSS | Severity | Published |
|---|---|---|---|---|
| CVE-2024-9820 | WP 2FA with Telegram <= 3.0 - Two-Factor Authentication Bypass — AuthPress | 6.5 | Medium | 2024-10-15 |
| CVE-2023-3050 | Authentication Bypass in TMT's Lockcell — Lockcell | 9.8 | Critical | 2023-06-13 |
| CVE-2022-3083 | Landis+Gyr E850 安全漏洞 — E850 (ZMQ200) | 3.9 | Low | 2023-02-01 |
| CVE-2020-8184 | RubyGem Rack 输入验证错误漏洞 — https://github.com/rack/rack | 7.5 | - | 2020-06-19 |
Vulnerabilities classified as CWE-784 (在安全决策中依赖未经验证和完整性检查的Cookie) represent 4 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.