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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-334 (随机数的空间太小) — Vulnerability Class 10

10 vulnerabilities classified as CWE-334 (随机数的空间太小). AI Chinese analysis included.

CWE-334 represents a cryptographic weakness where the entropy of generated random values is insufficient for the intended security context. This deficiency arises when the algorithm’s output space is too small, often due to poor seeding or limited bit-width, rendering the values predictable. Attackers typically exploit this by performing brute-force or statistical analysis attacks to guess the correct value, thereby bypassing authentication mechanisms, session identifiers, or cryptographic keys. To mitigate this risk, developers must employ cryptographically secure pseudo-random number generators (CSPRNGs) that provide adequate entropy. It is crucial to ensure that the random number generator is properly seeded with high-entropy sources and that the resulting values meet the minimum length requirements specified by current cryptographic standards, ensuring resistance against exhaustive search attempts.

MITRE CWE Description
The number of possible random values is smaller than needed by the product, making it more susceptible to brute force attacks.
Common Consequences (1)
Access Control, OtherBypass Protection Mechanism, Other
An attacker could easily guess the values used. This could lead to unauthorized access to a system if the seed is used for authentication and authorization.
Mitigations (1)
Architecture and Design, RequirementsUse products or modules that conform to FIPS 140-2 [REF-267] to avoid obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random Number Generators").
Examples (1)
The following XML example code is a deployment descriptor for a Java web application deployed on a Sun Java Application Server. This deployment descriptor includes a session configuration property for configuring the session ID length.
<sun-web-app> ... <session-config> <session-properties> <property name="idLengthBytes" value="8"> <description>The number of bytes in this web module's session ID.</description> </property> </session-properties> </session-config> ... </sun-web-app>
Bad · XML

Vulnerabilities classified as CWE-334 (随机数的空间太小) represent 10 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.