SiteShadow
Back to vulnerability library

CWE-331 Insufficient Entropy

What this means

SiteShadow flagged "randomness" or secret generation that draws from predictable sources (timestamps, usernames, counters, short seeds), resulting in low entropy.

Why it matters

Low entropy enables guessing and replay attacks.

Safer examples

1) Use secure randomness APIs

Use crypto.randomBytes (Node) or secrets (Python) for tokens (see CWE-338 / R01).

2) Avoid "unique" != "unpredictable"

UUIDs and timestamps can be unique but still predictable; don't use them as secrets unless they are random UUIDs and long enough for the threat model.

3) Keep secrets long enough

Use at least 128 bits of entropy for security tokens and keys.

How SiteShadow detects it (high level)

References

---

← Back to Vulnerability Library

Request access View coverage