CVE-2018-6519: Simplesamlphp/saml2 Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-hhm8-2j4g-mpgg
CVSS 7.5
CWE-74
Published
Advisory Summary

CVE-2018-6519 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Simplesamlphp/saml2 libraries in the Packagist ecosystem. The issue involves simplesamlphp saml2 library regular expression denial of service vulnerability. Remediation is available by upgrading affected packages to version 1.10.4, 2.3.5, 3.1.1.

CVE-2018-6519 at a Glance

CVE Identifier CVE-2018-6519
GHSA Identifier GHSA-hhm8-2j4g-mpgg
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Simplesamlphp/saml2
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:N/I:N/A:H).

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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2018-6519

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

simplesamlphp/saml2 fixed: 1.10.4
Upgrade simplesamlphp/saml2 to 1.10.4
simplesamlphp/saml2 fixed: 2.3.5
Upgrade simplesamlphp/saml2 to 2.3.5
simplesamlphp/saml2 fixed: 3.1.1
Upgrade simplesamlphp/saml2 to 3.1.1
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 simplesamlphp/saml2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2018-6519, inspect your project dependencies for Simplesamlphp/saml2:

inspect dependencies for simplesamlphp/saml2

Analyze the terminal output to locate any version of Simplesamlphp/saml2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.10.4), 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-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Simplesamlphp/saml2, 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 SAML2 library before 1.10.4, 2.x before 2.3.5, and 3.x before 3.1.1 in SimpleSAMLphp has a Regular Expression Denial of Service vulnerability for fraction-of-seconds data in a timestamp.

CVE-2018-6519 Affected Simplesamlphp/saml2 Versions

3 component(s)
Fixed Versions:
1.10.42.3.53.1.1
Product / Package Ecosystem Affected Versions Fixed Version
simplesamlphp/saml2
Packagist
< 1.10.4
1.10.4
simplesamlphp/saml2
Packagist
≥ 2.0
< 2.3.5
2.3.5
simplesamlphp/saml2
Packagist
≥ 3.0
< 3.1.1
3.1.1

References

Frequently Asked Questions

What is CVE-2018-6519?
CVE-2018-6519 is a security vulnerability in Simplesamlphp/saml2 involving SimpleSAMLphp SAML2 library Regular Expression Denial of Service vulnerability under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Simplesamlphp/saml2 versions are affected?
Affected versions include releases prior to 1.10.4, 2.3.5, 3.1.1 across affected packages: simplesamlphp/saml2.
What version fixes CVE-2018-6519?
Upgrading to 1.10.4, 2.3.5, 3.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is simplesamlphp/saml2 affected?
Yes, simplesamlphp/saml2 is affected in releases prior to 1.10.4, 2.3.5, 3.1.1. Upgrade your dependency to 1.10.4, 2.3.5, 3.1.1 or later.
What is the CVSS score of CVE-2018-6519?
CVE-2018-6519 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:N/I:N/A:H.
What CWE is associated with CVE-2018-6519?
CVE-2018-6519 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check Packagist dependencies for CVE-2018-6519?
Run the dependency tree command: 'inspect dependencies for simplesamlphp/saml2'. 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-hhm8-2j4g-mpgg",
  "modified" : "2024-04-25T21:00:19Z",
  "published" : "2022-05-14T02:57:33Z",
  "aliases" : [ "CVE-2018-6519" ],
  "summary" : "SimpleSAMLphp SAML2 library Regular Expression Denial of Service vulnerability",
  "details" : "The SAML2 library before 1.10.4, 2.x before 2.3.5, and 3.x before 3.1.1 in SimpleSAMLphp has a Regular Expression Denial of Service vulnerability for fraction-of-seconds data in a timestamp.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "simplesamlphp/saml2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.10.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "simplesamlphp/saml2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0"
      }, {
        "fixed" : "2.3.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "simplesamlphp/saml2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0"
      }, {
        "fixed" : "3.1.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-6519"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/simplesamlphp/saml2/CVE-2018-6519.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/simplesamlphp/simplesamlphp"
  }, {
    "type" : "WEB",
    "url" : "https://simplesamlphp.org/security/201801-01"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2018/dsa-4127"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-25T21:00:19Z",
    "nvd_published_at" : "2018-02-02T01:29:00Z"
  }
}