# CVE-2016-9814: SimpleSAMLphp SAML2 spoof SAML responses

> Remote attackers can spoof SAML responses or cause denial of service via improper boolean conversion in SimpleSAMLphp and saml2 libraries.

- **Severity:** Critical 9.1 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 16 Feb 2017
- **Updated:** 6 Aug 2024
- **Also known as:** DEBIAN-CVE-2016-9814, GHSA-r8v4-7vwj-983x, UBUNTU-CVE-2016-9814

## What is CVE-2016-9814?

CVE-2016-9814 is a critical vulnerability in n/a, published on 16 Feb 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The validateSignature method in the SAML2\Utils class in SimpleSAMLphp before 1.14.10 and simplesamlphp/saml2 library before 1.9.1, 1.10.x before 1.10.3, and 2.x before 2.3.3 allows remote attackers to spoof SAML responses or possibly cause a denial of service (memory consumption) by leveraging improper conversion of return values to boolean.

Weakness: CWE-399

## Which versions are affected by CVE-2016-9814?

8 open source packages ship an affected version, including simplesamlphp/saml2. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `simplesamlphp/saml2` | Packagist | All versions | 1.8.1 |
| `simplesamlphp/saml2` | Packagist | All versions | 1.8.1 |
| `simplesamlphp/saml2` | Packagist | From 1.10 | 1.10.3 |
| `simplesamlphp/saml2` | Packagist | From 1.10 | 1.10.3 |
| `simplesamlphp/saml2` | Packagist | From 1.9.0 | 1.9.1 |
| `simplesamlphp/saml2` | Packagist | From 1.9.0 | 1.9.1 |
| `simplesamlphp/saml2` | Packagist | From 2.0 | 2.3.3 |
| `simplesamlphp/saml2` | Packagist | From 2.0 | 2.3.3 |

Products: Simplesamlphp Saml2, Simplesamlphp Simplesamlphp.

## How do I fix CVE-2016-9814?

Upgrade simplesamlphp/saml2 to a fixed version for your release line: 1.8.1, 1.10.3, 1.9.1 or 2.3.3.

## Is CVE-2016-9814 being exploited?

There is no known exploitation of CVE-2016-9814 in the wild and no public exploit code.

## Other vulnerabilities in n/a

- [CVE-2023-49087](https://insights.sbomify.com/CVE-2023-49087/): Validation of SignedInfo (medium 6.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2016-9814 and fix it if it is affected.

What it is: CVE-2016-9814 is a critical vulnerability in n/a, published on 16 Feb 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2016-9814 in the wild and no public exploit code.

Affected packages and fixed versions:
- simplesamlphp/saml2 (Packagist): affected all versions; fixed in 1.8.1
- simplesamlphp/saml2 (Packagist): affected all versions; fixed in 1.8.1
- simplesamlphp/saml2 (Packagist): affected from 1.10; fixed in 1.10.3
- simplesamlphp/saml2 (Packagist): affected from 1.10; fixed in 1.10.3
- simplesamlphp/saml2 (Packagist): affected from 1.9.0; fixed in 1.9.1
- simplesamlphp/saml2 (Packagist): affected from 1.9.0; fixed in 1.9.1
- simplesamlphp/saml2 (Packagist): affected from 2.0; fixed in 2.3.3
- simplesamlphp/saml2 (Packagist): affected from 2.0; fixed in 2.3.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2016-9814/ (Markdown: https://insights.sbomify.com/CVE-2016-9814/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2016-9814
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2016-9814
- OSV: https://osv.dev/vulnerability/CVE-2016-9814

---
From sbomify Insights: https://insights.sbomify.com/CVE-2016-9814/
Summaries are generated and may contain mistakes; the official description above is the record.
