# CVE-2022-23505: Passport-wsfed-saml2 vulnerable to Authentication Bypass for WSFed authentication

> Remote attackers can bypass WSFed authentication in passport-wsfed-saml2 by using arbitrary signed assertions, potentially gaining unauthorized access.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/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:** 13 Dec 2022
- **Updated:** 23 Apr 2025
- **Also known as:** GHSA-ppjq-qxhx-m25f

## What is CVE-2022-23505?

CVE-2022-23505 is a medium-severity authentication bypass vulnerability in auth0 passport-wsfed-saml2, published on 13 Dec 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Passport-wsfed-saml2 is a ws-federation protocol and SAML2 tokens authentication provider for Passport. In versions prior to 4.6.3, a remote attacker may be able to bypass WSFed authentication on a website using passport-wsfed-saml2. A successful attack requires that the attacker is in possession of an arbitrary IDP signed assertion. Depending on the IDP used, fully unauthenticated attacks (e.g without access to a valid user) might also be feasible if generation of a signed message can be triggered. This issue is patched in version 4.6.3. Use of SAML2 authentication instead of WSFed is a workaround.

Weakness: CWE-287 (Improper Authentication)

## Which versions are affected by CVE-2022-23505?

2 open source packages ship an affected version, including passport-wsfed-saml2. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `passport-wsfed-saml2` | npm | All versions | 4.6.3 |
| `passport-wsfed-saml2` | npm | All versions | 4.6.3 |

Products: Auth0 Passport-Wsfed-Saml2.

## How do I fix CVE-2022-23505?

Upgrade passport-wsfed-saml2 to 4.6.3 or later.

## Is CVE-2022-23505 being exploited?

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

## Other vulnerabilities in auth0 passport-wsfed-saml2

- [CVE-2017-16897](https://insights.sbomify.com/CVE-2017-16897/): passport-wsfed-saml2 vulnerable to Signature Bypass in SAML2 token (high 8.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-23505 and fix it if it is affected.

What it is: CVE-2022-23505 is a medium-severity authentication bypass vulnerability in auth0 passport-wsfed-saml2, published on 13 Dec 2022. 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-2022-23505 in the wild and no public exploit code.

Affected packages and fixed versions:
- passport-wsfed-saml2 (npm): affected all versions; fixed in 4.6.3
- passport-wsfed-saml2 (npm): affected all versions; fixed in 4.6.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-2022-23505/ (Markdown: https://insights.sbomify.com/CVE-2022-23505/index.md)
```

## Sources

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

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