CVE-2017-18122: Simplesamlphp/simplesamlphp SimpleSAMLphp Signature Validation Bypass Vulnerability

HIGH
Advisory Identifier: GHSA-j4qf-3w33-8cgc
CVSS 8.1
CWE-347
Published
Advisory Summary

CVE-2017-18122 is a HIGH (CVSS 8.1) simplesamlphp signature validation bypass vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Simplesamlphp/simplesamlphp libraries in the Packagist ecosystem. The issue involves simplesamlphp signature validation bypass. Remediation is available by upgrading affected packages to version 1.14.17.

CVE-2017-18122 at a Glance

CVE Identifier CVE-2017-18122
GHSA Identifier GHSA-j4qf-3w33-8cgc
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-347: Improper Verification of Cryptographic Signature
Affected Product Simplesamlphp/simplesamlphp
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-2017-18122

To remediate this vulnerability, upgrade all affected Simplesamlphp/simplesamlphp 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/simplesamlphp fixed: 1.14.17
Upgrade simplesamlphp/simplesamlphp to 1.14.17
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/simplesamlphp

How to Check if You Are Affected

To determine whether your application is affected by CVE-2017-18122, inspect your project dependencies for Simplesamlphp/simplesamlphp:

inspect dependencies for simplesamlphp/simplesamlphp

Analyze the terminal output to locate any version of Simplesamlphp/simplesamlphp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.14.17), 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/simplesamlphp, 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

A signature-validation bypass issue was discovered in SimpleSAMLphp through 1.14.16. A SimpleSAMLphp Service Provider using SAML 1.1 will regard as valid any unsigned SAML response containing more than one signed assertion, provided that the signature of at least one of the assertions is valid. Attributes contained in all the assertions received will be merged and the entityID of the first assertion received will be used, allowing an attacker to impersonate any user of any IdP given an assertion signed by the targeted IdP.

CVE-2017-18122 Affected Simplesamlphp/simplesamlphp Versions

1 component(s)
Fixed Versions:
1.14.17
Product / Package Ecosystem Affected Versions Fixed Version
simplesamlphp/simplesamlphp
Packagist
< 1.14.17
1.14.17

References

Frequently Asked Questions

What is CVE-2017-18122?
CVE-2017-18122 is a security vulnerability in Simplesamlphp/simplesamlphp involving SimpleSAMLphp Signature validation bypass under CWE-347: Improper Verification of Cryptographic Signature.
Which Simplesamlphp/simplesamlphp versions are affected?
Affected versions include releases prior to 1.14.17 across affected packages: simplesamlphp/simplesamlphp.
What version fixes CVE-2017-18122?
Upgrading to 1.14.17 (or the latest patched release for your respective branch) resolves the vulnerability.
Is simplesamlphp/simplesamlphp affected?
Yes, simplesamlphp/simplesamlphp is affected in releases prior to 1.14.17. Upgrade your dependency to 1.14.17 or later.
What is the CVSS score of CVE-2017-18122?
CVE-2017-18122 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-2017-18122?
CVE-2017-18122 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-2017-18122?
Run the dependency tree command: 'inspect dependencies for simplesamlphp/simplesamlphp'. 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-j4qf-3w33-8cgc",
  "modified" : "2024-04-25T21:00:27Z",
  "published" : "2022-05-14T01:04:08Z",
  "aliases" : [ "CVE-2017-18122" ],
  "summary" : "SimpleSAMLphp Signature validation bypass",
  "details" : "A signature-validation bypass issue was discovered in SimpleSAMLphp through 1.14.16. A SimpleSAMLphp Service Provider using SAML 1.1 will regard as valid any unsigned SAML response containing more than one signed assertion, provided that the signature of at least one of the assertions is valid. Attributes contained in all the assertions received will be merged and the entityID of the first assertion received will be used, allowing an attacker to impersonate any user of any IdP given an assertion signed by the targeted IdP.",
  "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/simplesamlphp"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.14.17"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-18122"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/simplesamlphp/simplesamlphp/commit/e2d53086abbb253efb24ddcb49b116246eb0b6ca"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/simplesamlphp/simplesamlphp/CVE-2017-18122.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/simplesamlphp/simplesamlphp"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2018/02/msg00008.html"
  }, {
    "type" : "WEB",
    "url" : "https://simplesamlphp.org/security/201710-01"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2018/dsa-4127"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-347" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-25T21:00:27Z",
    "nvd_published_at" : "2018-02-02T15:29:00Z"
  }
}