# CVE-2023-41890: Sustainsys.Saml2 Insufficient Identity Provider Issuer Validation

> Insufficient issuer validation in Sustainsys.Saml2 allows malicious providers or users to bypass authentication checks, potentially leading to account takeover.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Sep 2023
- **Updated:** 15 Oct 2024
- **Also known as:** GHSA-fv2h-753j-9g39

## What is CVE-2023-41890?

CVE-2023-41890 is a high-severity authentication bypass vulnerability in Sustainsys Saml2, published on 19 Sep 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Sustainsys.Saml2 library adds SAML2P support to ASP.NET web sites, allowing the web site to act as a SAML2 Service Provider. 
Prior to versions 1.0.3 and 2.9.2, when a response is processed, the issuer of the Identity Provider is not sufficiently validated. This could allow a malicious identity provider to craft a Saml2 response that is processed as if issued by another identity provider. It is also possible for a malicious end user to cause stored state intended for one identity provider to be used when processing the response from another provider. An application is impacted if they rely on any of these features in their authentication/authorization logic: the issuer of the generated identity and claims; or items in the stored request state (AuthenticationProperties). This issue is patched in versions 2.9.2 and 1.0.3. The `AcsCommandResultCreated` notification can be used to add the validation required if an upgrade to patched packages is not possible.

Weakness: CWE-294 (Authentication Bypass by Capture-replay), CWE-289 (Authentication Bypass by Alternate Name)

## Which versions are affected by CVE-2023-41890?

6 open source packages ship an affected version, including Sustainsys.Saml2 and Kentor.AuthServices. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `Sustainsys.Saml2` | NuGet | All versions | 1.0.3 |
| `Sustainsys.Saml2` | NuGet | All versions | 1.0.3 |
| `Sustainsys.Saml2` | NuGet | From 2.0.0 | 2.9.2 |
| `Sustainsys.Saml2` | NuGet | From 2.0.0 | 2.9.2 |
| `Kentor.AuthServices` | NuGet | All versions to 0.23.0 | None |
| `Kentor.AuthServices` | NuGet | All versions to 0.23.0 | None |

Products: Sustainsys Saml2.

## How do I fix CVE-2023-41890?

Upgrade Sustainsys.Saml2 to a fixed version for your release line: 1.0.3 or 2.9.2.

## Is CVE-2023-41890 being exploited?

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

## Other vulnerabilities in Sustainsys Saml2

- [CVE-2020-5261](https://insights.sbomify.com/CVE-2020-5261/): Missing Token Replay Detection (high 8.2)
- [CVE-2020-5268](https://insights.sbomify.com/CVE-2020-5268/): Subject Confirmation Method not validated in Saml2 Authentication Services for ASP.NET (medium 6.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-41890 and fix it if it is affected.

What it is: CVE-2023-41890 is a high-severity authentication bypass vulnerability in Sustainsys Saml2, published on 19 Sep 2023. 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-2023-41890 in the wild and no public exploit code.

Affected packages and fixed versions:
- Sustainsys.Saml2 (NuGet): affected all versions; fixed in 1.0.3
- Sustainsys.Saml2 (NuGet): affected all versions; fixed in 1.0.3
- Sustainsys.Saml2 (NuGet): affected from 2.0.0; fixed in 2.9.2
- Sustainsys.Saml2 (NuGet): affected from 2.0.0; fixed in 2.9.2
- Kentor.AuthServices (NuGet): affected all versions up to 0.23.0; no fix listed
- Kentor.AuthServices (NuGet): affected all versions up to 0.23.0; no fix listed

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-2023-41890/ (Markdown: https://insights.sbomify.com/CVE-2023-41890/index.md)
```

## Sources

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

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