Predictable security token or capability identifier
A security token relies on randomness that does not meet its unpredictability requirement.
Candidate CWE: CWE-338
Test hypothesis#
Locate token generation in source and identify the random source, entropy input, encoding, and lifecycle. Generate a small synthetic fixture set locally and test a concrete prediction hypothesis. Compare against a cryptographically secure generator; do not brute-force live accounts.
Evidence required#
Show a prediction or generator-state argument sufficient to produce a valid controlled token, plus its accepted privilege and lifetime. Use a more precise CWE if the actual cause is insufficient entropy or an exposed token rather than the PRNG choice.
Rule out false positives#
Sequential public record IDs are not authentication secrets by themselves. A tiny sample passing or failing a statistical test does not establish cryptographic predictability.
Playbook and command references#
- Authentication, recovery, federation, and session lifecycle — Test registration, recovery, identity changes, invitations, SSO enforcement, and deprovisioning as one account state machine.
- Source review: entry point to protected operation — Trace attacker control and authorization through handlers, services, queues, and sensitive operations; promote only reachable violations of a stated invariant.
Find the associated command snippets
Referenced by these target playbooks#
Report checklist#
- Capture the affected version, configuration, identities, and object ownership.
- Preserve a valid baseline and a negative control.
- Reproduce the forbidden data access, action, or state change on controlled fixtures.
- Explain the intended security rule and why the observed behavior violates it.
- State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.
Conditional ATT&CK mapping#
No direct ATT&CK mapping selected. Record the weakness and demonstrated impact without forcing an adversary-behavior classification. See the mapping guide.