CVE-2018-7711: Simplesamlphp/saml2 SimpleSAMLphp Saml2 Incorrect Signature Validation Vulnerability

HIGH
Advisory Identifier: GHSA-g888-g2pp-82hf
CVSS 8.1
CWE-347
Published
Advisory Summary

CVE-2018-7711 is a HIGH (CVSS 8.1) simplesamlphp saml2 incorrect signature validation vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Simplesamlphp/saml2 libraries in the Packagist ecosystem. The issue involves simplesamlphp saml2 incorrect signature validation. Remediation is available by upgrading affected packages to version 1.10.6, 2.3.8, 3.1.4.

CVE-2018-7711 at a Glance

CVE Identifier CVE-2018-7711
GHSA Identifier GHSA-g888-g2pp-82hf
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Simplesamlphp/saml2
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.1

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

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

How to Fix CVE-2018-7711

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.6
Upgrade simplesamlphp/saml2 to 1.10.6
simplesamlphp/saml2 fixed: 2.3.8
Upgrade simplesamlphp/saml2 to 2.3.8
simplesamlphp/saml2 fixed: 3.1.4
Upgrade simplesamlphp/saml2 to 3.1.4
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-7711, 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.6), 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-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. 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

HTTPRedirect.php in the saml2 library in SimpleSAMLphp before 1.15.4 has an incorrect check of return values in the signature validation utilities, allowing an attacker to get invalid signatures accepted as valid by forcing an error during validation. This occurs because of a dependency on PHP functionality that interprets a -1 error code as a true boolean value.

CVE-2018-7711 Affected Simplesamlphp/saml2 Versions

3 component(s)
Fixed Versions:
1.10.62.3.83.1.4
Product / Package Ecosystem Affected Versions Fixed Version
simplesamlphp/saml2
Packagist
< 1.10.6
1.10.6
simplesamlphp/saml2
Packagist
≥ 2.0
< 2.3.8
2.3.8
simplesamlphp/saml2
Packagist
≥ 3.0
< 3.1.4
3.1.4

References

Frequently Asked Questions

What is CVE-2018-7711?
CVE-2018-7711 is a security vulnerability in Simplesamlphp/saml2 involving SimpleSAMLphp saml2 incorrect signature validation under CWE-347: Improper Verification of Cryptographic Signature.
Which Simplesamlphp/saml2 versions are affected?
Affected versions include releases prior to 1.10.6, 2.3.8, 3.1.4 across affected packages: simplesamlphp/saml2.
What version fixes CVE-2018-7711?
Upgrading to 1.10.6, 2.3.8, 3.1.4 (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.6, 2.3.8, 3.1.4. Upgrade your dependency to 1.10.6, 2.3.8, 3.1.4 or later.
What is the CVSS score of CVE-2018-7711?
CVE-2018-7711 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2018-7711?
CVE-2018-7711 is classified under CWE-347: Improper Verification of Cryptographic Signature (The product does not verify, or incorrectly verifies, the cryptographic signature for data.).
How can I check Packagist dependencies for CVE-2018-7711?
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-g888-g2pp-82hf",
  "modified" : "2023-07-25T20:55:06Z",
  "published" : "2022-05-14T03:34:12Z",
  "aliases" : [ "CVE-2018-7711" ],
  "summary" : "SimpleSAMLphp saml2 incorrect signature validation",
  "details" : "HTTPRedirect.php in the saml2 library in SimpleSAMLphp before 1.15.4 has an incorrect check of return values in the signature validation utilities, allowing an attacker to get invalid signatures accepted as valid by forcing an error during validation. This occurs because of a dependency on PHP functionality that interprets a -1 error code as a true boolean value.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "simplesamlphp/saml2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.10.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "simplesamlphp/saml2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0"
      }, {
        "fixed" : "2.3.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "simplesamlphp/saml2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0"
      }, {
        "fixed" : "3.1.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-7711"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/simplesamlphp/saml2/commit/4f6af7f69f29df8555a18b9bb7b646906b45924d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/simplesamlphp/saml2/CVE-2018-7711.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2018/03/msg00017.html"
  }, {
    "type" : "WEB",
    "url" : "https://simplesamlphp.org/security/201803-01"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-25T20:55:06Z",
    "nvd_published_at" : "2018-03-05T22:29:00Z"
  }
}