CVE-2016-1902: Symfony/security core Symfony Cryptographic Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-jjx5-fq5g-8xpc
CVSS 7.5
CWE-332
Published
Advisory Summary

CVE-2016-1902 is a HIGH (CVSS 7.5) symfony cryptographic vulnerability vulnerability (CWE-332: Insufficient Entropy in PRNG) affecting Symfony/security core libraries in the Packagist ecosystem. The issue involves symfony cryptographic vulnerability. Remediation is available by upgrading affected packages to version 2.6.13, 2.7.9, 2.3.37.

CVE-2016-1902 at a Glance

CVE Identifier CVE-2016-1902
GHSA Identifier GHSA-jjx5-fq5g-8xpc
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-332: Insufficient Entropy in PRNG
Affected Product Symfony/security core
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2016-1902

To remediate this vulnerability, upgrade all affected Symfony/security core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

symfony/security-core fixed: 2.6.13
Upgrade symfony/security-core to 2.6.13
symfony/security-core fixed: 2.7.9
Upgrade symfony/security-core to 2.7.9
symfony/security fixed: 2.3.37
Upgrade symfony/security to 2.3.37
symfony/security fixed: 2.6.13
Upgrade symfony/security to 2.6.13
symfony/security fixed: 2.7.9
Upgrade symfony/security to 2.7.9
symfony/symfony fixed: 2.3.37
Upgrade symfony/symfony to 2.3.37
symfony/symfony fixed: 2.6.13
Upgrade symfony/symfony to 2.6.13
symfony/symfony fixed: 2.7.9
Upgrade symfony/symfony to 2.7.9
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for symfony/security-core

How to Check if You Are Affected

To determine whether your application is affected by CVE-2016-1902, inspect your project dependencies for Symfony/security core:

inspect dependencies for symfony/security-core

Analyze the terminal output to locate any version of Symfony/security core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.6.13), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-332: Insufficient Entropy in PRNG, where the lack of entropy available for, or used by, a pseudo-random number generator (prng) can be a stability and security threat. In Symfony/security core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2016-1902 Affected Symfony/security core Versions

8 component(s)
Fixed Versions:
2.6.132.7.92.3.37
Product / Package Ecosystem Affected Versions Fixed Version
symfony/security-core
Packagist
≥ 2.4.0
< 2.6.13
2.6.13
symfony/security-core
Packagist
≥ 2.7.0
< 2.7.9
2.7.9
symfony/security
Packagist
≥ 2.3.0
< 2.3.37
2.3.37
symfony/security
Packagist
≥ 2.4.0
< 2.6.13
2.6.13
symfony/security
Packagist
≥ 2.7.0
< 2.7.9
2.7.9
symfony/symfony
Packagist
≥ 2.3.0
< 2.3.37
2.3.37
symfony/symfony
Packagist
≥ 2.4.0
< 2.6.13
2.6.13
symfony/symfony
Packagist
≥ 2.7.0
< 2.7.9
2.7.9

References

Frequently Asked Questions

What is CVE-2016-1902?
CVE-2016-1902 is a security vulnerability in Symfony/security core involving Symfony Cryptographic Vulnerability under CWE-332: Insufficient Entropy in PRNG.
Which Symfony/security core versions are affected?
Affected versions include releases prior to 2.6.13, 2.7.9, 2.3.37 across affected packages: symfony/security-core, symfony/security, symfony/symfony.
What version fixes CVE-2016-1902?
Upgrading to 2.6.13, 2.7.9, 2.3.37 (or the latest patched release for your respective branch) resolves the vulnerability.
Is symfony/security-core affected?
Yes, symfony/security-core is affected in releases prior to 2.6.13, 2.7.9. Upgrade your dependency to 2.6.13, 2.7.9 or later.
Is symfony/security affected?
Yes, symfony/security is affected in releases prior to 2.3.37, 2.6.13, 2.7.9. Upgrade your dependency to 2.3.37, 2.6.13, 2.7.9 or later.
What is the CVSS score of CVE-2016-1902?
CVE-2016-1902 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2016-1902?
CVE-2016-1902 is classified under CWE-332: Insufficient Entropy in PRNG (The lack of entropy available for, or used by, a Pseudo-Random Number Generator (PRNG) can be a stability and security threat.).
How can I check Packagist dependencies for CVE-2016-1902?
Run the dependency tree command: 'inspect dependencies for symfony/security-core'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jjx5-fq5g-8xpc",
  "modified" : "2024-02-08T19:37:28Z",
  "published" : "2022-05-17T03:54:47Z",
  "aliases" : [ "CVE-2016-1902" ],
  "summary" : "Symfony Cryptographic Vulnerability",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/security-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.4.0"
      }, {
        "fixed" : "2.6.13"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/security-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.7.0"
      }, {
        "fixed" : "2.7.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.0"
      }, {
        "fixed" : "2.3.37"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.4.0"
      }, {
        "fixed" : "2.6.13"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.7.0"
      }, {
        "fixed" : "2.7.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.0"
      }, {
        "fixed" : "2.3.37"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.4.0"
      }, {
        "fixed" : "2.6.13"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.7.0"
      }, {
        "fixed" : "2.7.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-1902"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/symfony/symfony/pull/17359"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/security-core/CVE-2016-1902.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/security/CVE-2016-1902.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2016-1902.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://symfony.com/cve-2016-1902"
  }, {
    "type" : "WEB",
    "url" : "https://www.landaire.net/blog/cve-2016-1902-symfony-securerandom"
  }, {
    "type" : "WEB",
    "url" : "http://symfony.com/blog/cve-2016-1902-securerandom-s-fallback-not-secure-when-openssl-fails"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2016/dsa-3588"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-332" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-31T23:05:36Z",
    "nvd_published_at" : "2016-06-01T22:59:00Z"
  }
}