Every CVE Search/ Get API key

CVE-2016-9955

Incorrect signature verification in SimpleSAMLphp

6.3 MediumFix available

CVE-2016-9955 is a medium vulnerability (CVSS 6.3) in Simplesamlphp, published February 16, 2017. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.18%, the 67th percentile. Fixed in simplesamlphp/simplesamlphp 1.14.11.

The SimpleSAML_XML_Validator class constructor in SimpleSAMLphp before 1.14.11 might allow remote attackers to spoof signatures on SAML 1 responses or possibly cause a denial of service (memory consumption) by leveraging improper conversion of return values to boolean.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
High
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
None
Integrity
High
Availability
High

Exploit likelihood

1.18%Unchanged since Feb 4, 2022
90%50%10%1%

What each source reports

NVD Score used 6.3

The SimpleSAML_XML_Validator class constructor in SimpleSAMLphp before 1.14.11 might allow remote attackers to spoof signatures on SAML 1 responses or possibly cause a denial of service (memory consumption) by leveraging improper conversion of return values to boolean.

Record
CVE-2016-9955
CVSS 3.0
6.3 MediumCVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:H
CVSS 2.0
4.0 MediumAV:N/AC:H/Au:N/C:N/I:P/A:P
Weakness
CWE-20
Updated
2026-11-02
CVE List No score

The SimpleSAML_XML_Validator class constructor in SimpleSAMLphp before 1.14.11 might allow remote attackers to spoof signatures on SAML 1 responses or possibly cause a denial of service (memory consumption) by leveraging improper conversion of return values to boolean.

Record
CVE-2016-9955
Updated
2026-11-02
EUVDEUVD-2020-0272 No score

The SimpleSAML_XML_Validator class constructor in SimpleSAMLphp before 1.14.11 might allow remote attackers to spoof signatures on SAML 1 responses or possibly cause a denial of service (memory consumption) by leveraging improper conversion of return values to boolean.

Record
EUVD-2020-0272
Updated
2026-11-03
GitHub AdvisoriesGHSA-p9cm-r7jg-8q3g 6.3

Incorrect signature verification in SimpleSAMLphp

Background

An incorrect check of return values in the signature validation utilities allows an attacker to get invalid signatures accepted as valid by forcing an error during validation.

Description

The SimpleSAML_XML_Validator class allows the verification of the XML digital signature of a SAML 1 message with a given key. In particular, the constructor of the class receives an XML node and a key to verify it and throws an exception in case there is an error, either caused by incorrect input or an invalid signature. This method uses the verify() method from the RobRichards\XMLSecDSig class to verify the signature with the given key, which in turn will end up calling openssl_verify() depending on the signature algorithm used.

The openssl_verify() function returns 1 when the signature was successfully verified, 0 if it failed to verify with the given key and -1 in case an error occurs. PHP allows translating numerical values to boolean implicitly, with the following correspondences:

  • 0 equals false
  • Non-zero equals true

This means that an implicit conversion to boolean of the values returned by openssl_verify() will convert an error state, signaled by the value -1, to successful verification of the signature (represented by the boolean true).

The aforementioned constructor was performing an implicit conversion to boolean of the values returned by the verify() method, which subsequently will return the same output as openssl_verify() under most circumstances. This means an error during signature verification is treated as a successful verification by the method.

Affected versions

All SimpleSAMLphp versions prior to 1.14.11.

Impact

Upon successful exploitation, an invalid signature would be regarded as valid by an affected version of the software. This allows attackers to modify or manually craft SAML 1 response messages and, by triggering a signature validation error in the affected party, get those messages accepted as valid and coming from a trusted entity. In practice, this means full capabilities to impersonate any individual at a given service provider.

The issue can be exploited to get other invalid messages accepted as valid, though the security implications there are minor.

In order to exploit the issue, SAML 1.1 metadata must be registered by the vulnerable Service Provider for the Identity Provider targeted by the attacker (in metadata/shib13-idp-remote.php), and an incorrect context must be fed to the signature validation routines, or an exceptional error must be triggered. So far, the following cases have been identified:

  • Using a DSA public key to validate an XML signature made with an RSA-related algorithm.
  • Using an RSA public key to validate an XML signature made with a DSA-related algorithm.
  • Exhausting available memory while verifying the signature.

SimpleSAMLphp does not support DSA signatures or keys. Therefore, it is not possible for an attacker to feed an incorrect context by sending a signature with an incorrect algorithm. Upon reception of a DSA-SHA1 signature, SimpleSAMLphp will refuse to perform the validation due to the algorithm not being supported. On the other hand, if an attacker manages to trick a service provider operator to change the public key associated to a certain IdP to a DSA key, signatures made with any combination of the RSA algorithm will be accepted, regardless of whether they are valid or not. This means some serious misconfiguration or social engineering is needed in this case for a successful attack.

Regarding memory exhaustion, it is in theory possible to attack a service provider causing the consumption of all available memory while a message with an invalid signature is being validated. However, memory exhaustion must happen only during signature validation and not immediately before or after. This means exploitation of this case is extremely difficult due to the small time window available…

Record
GHSA-p9cm-r7jg-8q3g
CVSS 3.0
6.3 MediumCVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:H
Weakness
CWE-20
Updated
2026-11-02
OSV 6.3

The SimpleSAML_XML_Validator class constructor in SimpleSAMLphp before 1.14.11 might allow remote attackers to spoof signatures on SAML 1 responses or possibly cause a denial of service (memory consumption) by leveraging improper conversion of return values to boolean.

Record
CVE-2016-9955
CVSS 3.0
6.3 MediumCVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2016-9955 6.3

The SimpleSAML_XML_Validator class constructor in SimpleSAMLphp before 1.14.11 might allow remote attackers to spoof signatures on SAML 1 responses or possibly cause a denial of service (memory consumption) by leveraging improper conversion of return values to boolean.

Record
DEBIAN-CVE-2016-9955
CVSS 3.0
6.3 MediumCVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:H
Updated
2026-11-02
OSVGHSA-p9cm-r7jg-8q3g 6.3

Incorrect signature verification in SimpleSAMLphp

Background

An incorrect check of return values in the signature validation utilities allows an attacker to get invalid signatures accepted as valid by forcing an error during validation.

Description

The SimpleSAML_XML_Validator class allows the verification of the XML digital signature of a SAML 1 message with a given key. In particular, the constructor of the class receives an XML node and a key to verify it and throws an exception in case there is an error, either caused by incorrect input or an invalid signature. This method uses the verify() method from the RobRichards\XMLSecDSig class to verify the signature with the given key, which in turn will end up calling openssl_verify() depending on the signature algorithm used.

The openssl_verify() function returns 1 when the signature was successfully verified, 0 if it failed to verify with the given key and -1 in case an error occurs. PHP allows translating numerical values to boolean implicitly, with the following correspondences:

  • 0 equals false
  • Non-zero equals true

This means that an implicit conversion to boolean of the values returned by openssl_verify() will convert an error state, signaled by the value -1, to successful verification of the signature (represented by the boolean true).

The aforementioned constructor was performing an implicit conversion to boolean of the values returned by the verify() method, which subsequently will return the same output as openssl_verify() under most circumstances. This means an error during signature verification is treated as a successful verification by the method.

Affected versions

All SimpleSAMLphp versions prior to 1.14.11.

Impact

Upon successful exploitation, an invalid signature would be regarded as valid by an affected version of the software. This allows attackers to modify or manually craft SAML 1 response messages and, by triggering a signature validation error in the affected party, get those messages accepted as valid and coming from a trusted entity. In practice, this means full capabilities to impersonate any individual at a given service provider.

The issue can be exploited to get other invalid messages accepted as valid, though the security implications there are minor.

In order to exploit the issue, SAML 1.1 metadata must be registered by the vulnerable Service Provider for the Identity Provider targeted by the attacker (in metadata/shib13-idp-remote.php), and an incorrect context must be fed to the signature validation routines, or an exceptional error must be triggered. So far, the following cases have been identified:

  • Using a DSA public key to validate an XML signature made with an RSA-related algorithm.
  • Using an RSA public key to validate an XML signature made with a DSA-related algorithm.
  • Exhausting available memory while verifying the signature.

SimpleSAMLphp does not support DSA signatures or keys. Therefore, it is not possible for an attacker to feed an incorrect context by sending a signature with an incorrect algorithm. Upon reception of a DSA-SHA1 signature, SimpleSAMLphp will refuse to perform the validation due to the algorithm not being supported. On the other hand, if an attacker manages to trick a service provider operator to change the public key associated to a certain IdP to a DSA key, signatures made with any combination of the RSA algorithm will be accepted, regardless of whether they are valid or not. This means some serious misconfiguration or social engineering is needed in this case for a successful attack.

Regarding memory exhaustion, it is in theory possible to attack a service provider causing the consumption of all available memory while a message with an invalid signature is being validated. However, memory exhaustion must happen only during signature validation and not immediately before or after. This means exploitation of this case is extremely difficult due to the small time window available…

Record
GHSA-p9cm-r7jg-8q3g
CVSS 3.0
6.3 MediumCVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:H
Weakness
CWE-20
Updated
2026-11-02
OSVUBUNTU-CVE-2016-9955 6.3

The SimpleSAML_XML_Validator class constructor in SimpleSAMLphp before 1.14.11 might allow remote attackers to spoof signatures on SAML 1 responses or possibly cause a denial of service (memory consumption) by leveraging improper conversion of return values to boolean.

Record
UBUNTU-CVE-2016-9955
CVSS 3.0
6.3 MediumCVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:H
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
simplesamlphp/simplesamlphp
Packagist
before 1.14.11
1.14.11
simplesamlphp
Debian:12
before 1.14.11-1
1.14.11-1
simplesamlphp
Debian:14
before 1.14.11-1, plus listed versions
1.10.0-11.11.0-11.12.0-11.12.0~rc1-11.12.0~rc2-1
Show 32 moreShow less
1.13.0-11.13.1-11.13.1-21.13.2-11.14.0-11.14.1-11.14.10-11.14.2-11.14.2-21.14.3-11.14.4-11.14.5-11.14.6-11.14.7-11.14.8-11.14.9-11.6.0-11.6.1-11.6.2-11.6.3-11.6.3-21.6.3-31.7.0-11.7.0-21.8.0-11.8.1-11.8.2-11.9.0-11.9.0~rc1-11.9.0~rc2-11.9.1-11.9.2-1
1.14.11-1
simplesamlphp
Debian:7
before 1.9.2-1+deb7u3, plus listed versions
1.9.2-11.9.2-1+deb7u11.9.2-1+deb7u2
1.9.2-1+deb7u3
simplesamlphp/simplesamlphp
Packagist
before 1.14.11, plus listed versions
v1.12.0v1.13.0v1.13.0-rc1v1.13.0-rc2v1.13.1
Show 13 moreShow less
v1.13.2v1.14.0v1.14.0-rc1v1.14.1v1.14.10v1.14.2v1.14.3v1.14.4v1.14.5v1.14.6v1.14.7v1.14.8v1.14.9
1.14.11
simplesamlphp
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
1.13.2-11.14.0-11.14.0-1ubuntu21.14.0-1ubuntu2+esm1
None known

History

History
WhenChangedSources
2026-11-03aliasesEUVD
2026-11-02createdCVE List, GitHub Advisories, NVD, OSV

References

Show 6 moreShow less
This page doesn't list everything

Left out here: the rest of 2 source descriptions. The JSON record has them.

MoveEnter Open