20 vulnerabilities classified as CWE-565 (在信任Cookie未进行验证与完整性检查). AI Chinese analysis included.
CWE-565 represents a critical input validation weakness where applications trust cookie data without verifying its integrity or authenticity. Attackers typically exploit this by manipulating cookie values, such as altering session identifiers or privilege flags, to impersonate legitimate users or escalate permissions. Since cookies are client-side and easily modified, relying on them for security decisions allows adversaries to bypass authentication mechanisms or access unauthorized resources. To mitigate this risk, developers must implement server-side validation for all security-critical operations, ensuring that cookie data is cross-referenced with secure server sessions. Additionally, using cryptographic signing or digital signatures for cookie contents helps detect tampering, while enforcing strict access controls ensures that sensitive actions are never solely dependent on unverified client-side information.
Cookie[] cookies = request.getCookies(); for (int i =0; i< cookies.length; i++) { Cookie c = cookies[i]; if (c.getName().equals("role")) { userRole = c.getValue(); } }Vulnerabilities classified as CWE-565 (在信任Cookie未进行验证与完整性检查) represent 20 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.