CVE-2018-7644: Simplesamlphp/saml2 SimpleSAMLphp Improper Verification Of Cryptographic Vulnerability

HIGH
Advisory Identifier: GHSA-923w-2xv2-7pr8
CVSS 7.5
CWE-347
Published
Advisory Summary

CVE-2018-7644 is a HIGH (CVSS 7.5) simplesamlphp improper verification of cryptographic vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Simplesamlphp/saml2 libraries in the Packagist ecosystem. The issue involves simplesamlphp improper verification of cryptographic signature. Remediation is available by upgrading affected packages to version 1.10.5, 2.3.7, 3.1.3.

CVE-2018-7644 at a Glance

CVE Identifier CVE-2018-7644
GHSA Identifier GHSA-923w-2xv2-7pr8
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
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:H/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 None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2018-7644

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.5
Upgrade simplesamlphp/saml2 to 1.10.5
simplesamlphp/saml2 fixed: 2.3.7
Upgrade simplesamlphp/saml2 to 2.3.7
simplesamlphp/saml2 fixed: 3.1.3
Upgrade simplesamlphp/saml2 to 3.1.3
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-7644, 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.5), 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

The XmlSecLibs library as used in the saml2 library in SimpleSAMLphp before 1.15.3 incorrectly verifies signatures on SAML assertions, allowing a remote attacker to construct a crafted SAML assertion on behalf of an Identity Provider that would pass as cryptographically valid, thereby allowing them to impersonate a user from that Identity Provider, aka a key confusion issue.

CVE-2018-7644 Affected Simplesamlphp/saml2 Versions

3 component(s)
Fixed Versions:
1.10.52.3.73.1.3
Product / Package Ecosystem Affected Versions Fixed Version
simplesamlphp/saml2
Packagist
< 1.10.5
1.10.5
simplesamlphp/saml2
Packagist
≥ 2.0
< 2.3.7
2.3.7
simplesamlphp/saml2
Packagist
≥ 3.0
< 3.1.3
3.1.3

References

Frequently Asked Questions

What is CVE-2018-7644?
CVE-2018-7644 is a security vulnerability in Simplesamlphp/saml2 involving SimpleSAMLphp Improper Verification of Cryptographic Signature under CWE-347: Improper Verification of Cryptographic Signature.
Which Simplesamlphp/saml2 versions are affected?
Affected versions include releases prior to 1.10.5, 2.3.7, 3.1.3 across affected packages: simplesamlphp/saml2.
What version fixes CVE-2018-7644?
Upgrading to 1.10.5, 2.3.7, 3.1.3 (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.5, 2.3.7, 3.1.3. Upgrade your dependency to 1.10.5, 2.3.7, 3.1.3 or later.
What is the CVSS score of CVE-2018-7644?
CVE-2018-7644 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:H/A:N.
What CWE is associated with CVE-2018-7644?
CVE-2018-7644 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-7644?
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-923w-2xv2-7pr8",
  "modified" : "2024-04-25T21:00:33Z",
  "published" : "2022-05-13T01:53:23Z",
  "aliases" : [ "CVE-2018-7644" ],
  "summary" : "SimpleSAMLphp Improper Verification of Cryptographic Signature",
  "details" : "The XmlSecLibs library as used in the saml2 library in SimpleSAMLphp before 1.15.3 incorrectly verifies signatures on SAML assertions, allowing a remote attacker to construct a crafted SAML assertion on behalf of an Identity Provider that would pass as cryptographically valid, thereby allowing them to impersonate a user from that Identity Provider, aka a key confusion issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "simplesamlphp/saml2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.10.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "simplesamlphp/saml2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0"
      }, {
        "fixed" : "2.3.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "simplesamlphp/saml2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0"
      }, {
        "fixed" : "3.1.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-7644"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/simplesamlphp/saml2/CVE-2018-7644.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/simplesamlphp/simplesamlphp"
  }, {
    "type" : "WEB",
    "url" : "https://simplesamlphp.org/security/201802-01"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-25T21:00:32Z",
    "nvd_published_at" : "2018-03-05T14:29:00Z"
  }
}