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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-341 (从可观察状态的可预测) — Vulnerability Class 10

10 vulnerabilities classified as CWE-341 (从可观察状态的可预测). AI Chinese analysis included.

CWE-341 represents a design weakness where security-critical values, such as session tokens or cryptographic keys, are generated using predictable inputs observable by an attacker. This flaw typically enables attackers to guess or reconstruct sensitive identifiers by analyzing system states like timestamps, process IDs, or sequential counters, thereby bypassing authentication or hijacking active sessions. Developers mitigate this risk by implementing cryptographically secure random number generators that produce high-entropy outputs independent of observable system variables. Additionally, utilizing non-sequential, unpredictable identifiers and regularly rotating secrets ensures that even if partial state information is leaked, the resulting values remain computationally infeasible to predict, maintaining the integrity and confidentiality of the application’s security mechanisms.

MITRE CWE Description
A number or object is predictable based on observations that the attacker can make about the state of the system or network, such as time, process ID, etc.
Common Consequences (1)
OtherVaries by Context
This weakness could be exploited by an attacker in a number ways depending on the context. If a predictable number is used to generate IDs or keys that are used within protection mechanisms, then an attacker could gain unauthorized access to the system. If predictable filenames are used for storing …
Mitigations (3)
ImplementationIncrease the entropy used to seed a PRNG.
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").
ImplementationUse a PRNG that periodically re-seeds itself using input from high-quality sources, such as hardware devices with high entropy. However, do not re-seed too frequently, or else the entropy source might block.
Examples (1)
This code generates a unique random identifier for a user's session.
function generateSessionID($userID){ srand($userID); return rand(); }
Bad · PHP

Vulnerabilities classified as CWE-341 (从可观察状态的可预测) represent 10 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.