---
title: "CWE-332: Insufficient Entropy in PRNG"
url: https://radicalnotion.ai/cwe/cwe-332
type: cwe
description: "The lack of entropy available for, or used by, a Pseudo-Random Number Generator (PRNG) can be a stability and security threat."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-332: Insufficient Entropy in PRNG

- **Abstraction:** Variant
- **Structure:** Simple
- **Status:** Draft
- **Likelihood of exploit:** Medium
- **CVEs with this as primary weakness:** 10
- **Of those, in CISA KEV:** 0
- **New in 2026:** 1
- **CWE catalog version:** 4.21

## Description

The lack of entropy available for, or used by, a Pseudo-Random Number Generator (PRNG) can be a stability and security threat.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | - |
| Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Availability | DoS: Crash, Exit, or Restart | If a pseudo-random number generator is using a limited entropy source which runs out (if the generator fails closed), the program may pause or crash. |
| Access Control, Other | Bypass Protection Mechanism, Other | If a PRNG is using a limited entropy source which runs out, and the generator fails open, the generator could produce predictable random numbers. Potentially a weak source of random numbers could weaken the encryption method used for authentication of users. |

## Potential mitigations

### 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

Consider a PRNG that re-seeds itself as needed from high-quality pseudo-random output, such as hardware devices.

### Architecture and Design

When deciding which PRNG to use, look at its sources of entropy. Depending on what your security needs are, you may need to use a random number generator that always uses strong random data -- i.e., a random number generator that attempts to be strong but will fail in a weak way or will always provide some middle ground of protection through techniques like re-seeding. Generally, something that always provides a predictable amount of strength is preferable.

## Detection methods

### Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2019-1715 | security product has insufficient entropy in the DRBG, allowing collisions and private key discovery |

## Real CVEs with this weakness

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2018-9057 | HashiCorp Terraform Amazon Web Services (AWS) uses an insecure PRNG | critical | 9.8 | - | No | 2018-03-27 |
| CVE-2023-20107 | Cisco Adaptive Security Appliance Software and Firepower Threat Defense Software Low-Entropy Keys Vulnerability | high | 7.5 | - | No | 2023-03-23 |
| CVE-2019-1715 | Cisco Adaptive Security Appliance Software and Firepower Threat Defense Software Low-Entropy Keys Vulnerability | high | 7.5 | - | No | 2019-05-03 |
| CVE-2016-10743 | hostapd: Not preventig the use of low quality PRNG leads to insufficient entropy | high | 7.5 | - | No | 2019-03-23 |
| CVE-2014-9690 | - | high | 7.5 | - | No | 2017-04-02 |
| CVE-2016-9154 | Insufficient Entropy in PRNG in Siemens Desigo PX Web Module Insufficient Entropy | high | 7.5 | - | No | 2016-12-23 |
| CVE-2026-3290 | Timing limitations of the HRNG in RS9116 when power save mode is enabled results in predictable values | high | 7.4 | - | No | 2026-05-14 |
| CVE-2017-18486 | - | high | 7.2 | - | No | 2019-08-09 |
| CVE-2014-0016 | stunnel: Improper initialization of PRNG after fork() | medium | 4.3 | - | No | 2014-03-23 |
| CVE-2017-9371 | - | low | 2.6 | - | No | 2017-11-14 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-331](https://radicalnotion.ai/cwe/cwe-331) | Insufficient Entropy |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| CLASP | Insufficient entropy in PRNG | - | - |
| The CERT Oracle Secure Coding Standard for Java (2011) | Generate strong random numbers | MSC02-J | - |

## Frequently asked questions

### What is CWE-332?

The lack of entropy available for, or used by, a Pseudo-Random Number Generator (PRNG) can be a stability and security threat.

### What CVEs are caused by CWE-332?

10 recorded CVEs are attributed to CWE-332, including CVE-2018-9057, CVE-2023-20107 and CVE-2019-1715.

### How do you prevent CWE-332?

Use products or modules that conform to FIPS 140-2 to avoid obvious entropy problems. Consult FIPS 140-2 Annex C ("Approved Random Number Generators").

### How is CWE-332 detected?

Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

### What are the consequences of CWE-332?

Exploiting CWE-332 can lead to: DoS: Crash, Exit, or Restart, Bypass Protection Mechanism, Other.

### Is CWE-332 actively exploited?

10 recorded CVEs are caused by CWE-332; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/332.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-332). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
