CVE-2026-11625
Received Received - Intake
Predictable PRNG in Bytes::Random::Secure Perl Library

Publication date: 2026-06-26

Last updated on: 2026-06-26

Assigner: CPANSec

Description
Bytes::Random::Secure versions through 0.29 for Perl share internal state across forked processes. When an object is initialised before forking, or when the functional interface is used, then the internal state for the PRNG is shared across processes and identical random streams will be produced. Secrets generated in multiprocess applications are predictable across processes.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-26
Last Modified
2026-06-26
Generated
2026-06-26
AI Q&A
2026-06-26
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Currently, no data is known.
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-335 The product uses a Pseudo-Random Number Generator (PRNG) but does not correctly manage seeds.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

The vulnerability exists in Bytes::Random::Secure versions through 0.29 for Perl, where the internal state of the pseudo-random number generator (PRNG) is shared across forked processes. When an object is initialized before forking, or when the functional interface is used, the PRNG state is not updated for the new process. This causes identical random streams to be produced in multiple processes.

Specifically, if a new process reuses the process ID (PID) of a previous process that had an active instance of the module, it can inherit the old process's RNG state. This leads to predictable random values across processes, compromising the randomness and security of generated secrets.

Impact Analysis

This vulnerability can impact you by making secrets generated in multiprocess applications predictable across processes. Since the random number generator state is shared or reused improperly, attackers could potentially guess or reproduce secrets such as cryptographic keys, tokens, or session identifiers.

This predictability undermines the security guarantees of randomness, potentially leading to unauthorized access, data breaches, or other security failures in applications relying on this module for secure random values.

Detection Guidance

This vulnerability arises from the internal PRNG state being shared across forked processes, leading to identical random streams. Detection involves verifying whether the Bytes::Random::Secure module is used in your Perl applications, especially in multiprocess or forked environments.

Since the issue is related to the internal state of the random number generator not being reinitialized after a fork, you can test for it by checking if multiple forked processes produce identical random outputs.

A simple detection approach is to run a Perl script that generates random bytes before and after forking and compare the outputs. If the outputs are identical across forked processes, the vulnerability is present.

  • Use a Perl script to generate random bytes before and after fork, for example:
  • ```perl use Bytes::Random::Secure; my $rng = Bytes::Random::Secure->new(); print "Parent: " . $rng->bytes(16) . "\n"; my $pid = fork(); if ($pid == 0) { print "Child: " . $rng->bytes(16) . "\n"; exit; } waitpid($pid, 0); ```

If the 'Parent' and 'Child' outputs are identical, the vulnerability exists.

Mitigation Strategies

To mitigate this vulnerability, ensure that the Bytes::Random::Secure module reinitializes its internal PRNG state after a fork to prevent sharing identical random streams across processes.

The patch for this vulnerability introduces a process ID (PID) tracking mechanism. It stores the current PID when the RNG is instantiated and checks the PID before generating random bytes. If the PID has changed (indicating a fork), the RNG is reinitialized to produce secure, unpredictable random values.

Immediate mitigation steps include:

  • Apply the official patch that adds PID tracking and RNG reinitialization (see Resource 1).
  • If patching is not immediately possible, avoid generating secrets before forking or using the functional interface that shares RNG state.
  • Restart affected applications after applying the patch to ensure the fix takes effect.
Compliance Impact

The vulnerability causes predictable random streams across forked processes, which means secrets generated in multiprocess applications can be guessed or predicted.

This predictability in secret generation can lead to weakened security controls, potentially resulting in unauthorized access or data breaches.

Such security weaknesses may impact compliance with standards and regulations like GDPR and HIPAA, which require strong protection of sensitive data and cryptographic secrets.

Specifically, failure to securely generate secrets could violate requirements for data confidentiality and integrity, increasing the risk of non-compliance.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-11625. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart