CVE-2016-1902 · mitre
CVE-2016-1902
The nextBytes function in the SecureRandom class in Symfony before 2.3.37, 2.6.x before 2.6.13, and 2.7.x before 2.7.9 does not properly generate random numbers when used with PHP 5.x without the paragonie/random_compat library and the openssl_random_pseudo_bytes function fails, which makes it easier for attackers to defeat cryptographic protection mechanisms via unspecified vectors.
Published 2016-06-01, last changed 2026-06-17. Weakness: CWE-310.
How to fix
Upgrade to a fixed version: symfony/security-core 2.6.13, 2.7.9 (Packagist); symfony/security 2.3.37, 2.6.13, 2.7.9 (Packagist); symfony/symfony 2.3.37, 2.6.13, 2.7.9 (Packagist) (each is the fix for its own release line). For the version that clears every advisory for your installed version, ask an agent for get_remediation.
Where the flaw is in the code
Fixed in symfony/symfony by pull request #17359. Functions changed by the fix: __construct, nextBytes, readSeed, updateSeed. Regression tests: src/Symfony/Component/Security/Tests/Core/Util/SecureRandomTest.php. Confidence: verified (a record names this commit as the fix, and it changed these functions).
Timeline
| 2016-06-01 | Published |
| 2022-05-17 | Package advisory GHSA-jjx5-fq5g-8xpc |
| 2026-06-17 | Record last changed |
| 2026-11-30 | EPSS when our history starts: 1.91% |
| 2026-12-02 | Code-level analysis added |
Affected packages
| Advisory | Package | Fixed in |
|---|---|---|
| GHSA-jjx5-fq5g-8xpc | symfony/security-core (Packagist) | 2.6.13 |
| GHSA-jjx5-fq5g-8xpc | symfony/security-core (Packagist) | 2.7.9 |
| GHSA-jjx5-fq5g-8xpc | symfony/security (Packagist) | 2.3.37 |
| GHSA-jjx5-fq5g-8xpc | symfony/security (Packagist) | 2.6.13 |
| GHSA-jjx5-fq5g-8xpc | symfony/security (Packagist) | 2.7.9 |
Also known as: GHSA-jjx5-fq5g-8xpc
Related
| CVE | Published | CVSS | Summary |
|---|---|---|---|
| CVE-2021-21424 | 2021-05-13 | 5.3 | Prevent user enumeration using Guard or the new Authenticator-based Security |
| CVE-2017-11365 | 2019-05-23 | 9.8 | same package: symfony/security-core (Packagist) |
| CVE-2018-11407 | 2018-06-13 | 9.8 | same package: symfony/security-core (Packagist) |
| CVE-2016-2403 | 2017-02-07 | 9.8 | same package: symfony/security-core (Packagist) |
| CVE-2020-5275 | 2020-03-30 | 8.1 | Firewall configured with unanimous strategy was not actually unanimous in symfony/security-http |
| CVE-2019-10911 | 2019-05-16 | 7.5 | same package: symfony/security (Packagist) |
| CVE-2018-19790 | 2018-12-18 | 6.1 | same package: symfony/security (Packagist) |
| CVE-2017-16653 | 2018-08-06 | 5.9 | same package: symfony/security (Packagist) |
Add it to your agent
One command for Claude Code; setup for Claude Desktop, Cursor and others. No signup or key.
claude mcp add --transport http keygraph-cve https://cve-mcp.keygraph.io/mcp
Then ask for triage_cve CVE-2016-1902, or call /api/v1/vulnerabilities/CVE-2016-1902. To prove whether it is exploitable in your running app, run Shannon, Keygraph's open-source AI pentester.