CWE-342: Predictable Exact Value from Previous Values

Base Draft Simple

CWE版本: 4.18

更新日期: 2025-09-09

弱点描述

An exact value or random number can be precisely predicted by observing previous values.

常见后果

影响范围: Other

技术影响: Varies by Context

潜在缓解措施

描述: Increase the entropy used to seed a PRNG.

阶段: Architecture and Design Requirements

策略: Libraries or Frameworks

描述: Use 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").

阶段: Implementation

描述: Use 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.

观察示例

参考: CVE-2002-1463

Firewall generates easily predictable initial sequence numbers (ISN), which allows remote attackers to spoof connections.

参考: CVE-1999-0074

Listening TCP ports are sequentially allocated, allowing spoofing attacks.

参考: CVE-1999-0077

Predictable TCP sequence numbers allow spoofing.

参考: CVE-2000-0335

DNS resolver uses predictable IDs, allowing a local user to spoof DNS query results.

引入模式

阶段 说明
Architecture and Design -
Implementation -

适用平台

编程语言
Not Language-Specific (Undetermined)

分类映射

分类名称 条目ID 条目名称 映射适配度
PLOVER - Predictable Exact Value from Previous Values -
关键信息

CWE ID: CWE-342

抽象级别: Base

结构: Simple

状态: Draft

相关弱点