# GHSA-5j8p-438x-rgg5: SAML PHP Toolkit Vulnerability on xmlseclibs CVE-2025-66475

> Attackers can impersonate users via signature wrapping in the SAML PHP Toolkit, requiring an upgrade to patched versions.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Dec 2025

## What is GHSA-5j8p-438x-rgg5?

GHSA-5j8p-438x-rgg5 is an authentication bypass vulnerability in onelogin/php-saml, published on 9 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

**Summary**

There is a critical vulnerability on xmlseclibs [CVE-2025-66475](https://github.com/robrichards/xmlseclibs/security/advisories/GHSA-c4cc-x928-vjw9), a dependency of php-saml

Update to the following versions of php-saml which forces the use of patched versions of xmlseclibs:
- [2.21.1](https://github.com/SAML-Toolkits/php-saml/releases/tag/2.21.1)
- [3.8.1](https://github.com/SAML-Toolkits/php-saml/releases/tag/3.8.1)
- [4.3.1](https://github.com/SAML-Toolkits/php-saml/releases/tag/4.3.1)

**Impact**

Signature Wrapping Vulnerabilities allows an attacker to impersonate a user.

## Which versions are affected by GHSA-5j8p-438x-rgg5?

6 open source packages ship an affected version, including onelogin/php-saml.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `onelogin/php-saml` | Packagist | All versions | 2.21.1 |
| `onelogin/php-saml` | Packagist | All versions | 2.21.1 |
| `onelogin/php-saml` | Packagist | From 3.0.0 | 3.8.1 |
| `onelogin/php-saml` | Packagist | From 3.0.0 | 3.8.1 |
| `onelogin/php-saml` | Packagist | From 4.0.0 | 4.3.1 |
| `onelogin/php-saml` | Packagist | From 4.0.0 | 4.3.1 |

## How do I fix GHSA-5j8p-438x-rgg5?

Upgrade onelogin/php-saml to a fixed version for your release line: 2.21.1, 3.8.1 or 4.3.1.

## Is GHSA-5j8p-438x-rgg5 being exploited?

There is no known exploitation of GHSA-5j8p-438x-rgg5 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-5j8p-438x-rgg5 and fix it if it is affected.

What it is: GHSA-5j8p-438x-rgg5 is an authentication bypass vulnerability in onelogin/php-saml, published on 9 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-5j8p-438x-rgg5 in the wild and no public exploit code.

Affected packages and fixed versions:
- onelogin/php-saml (Packagist): affected all versions; fixed in 2.21.1
- onelogin/php-saml (Packagist): affected all versions; fixed in 2.21.1
- onelogin/php-saml (Packagist): affected from 3.0.0; fixed in 3.8.1
- onelogin/php-saml (Packagist): affected from 3.0.0; fixed in 3.8.1
- onelogin/php-saml (Packagist): affected from 4.0.0; fixed in 4.3.1
- onelogin/php-saml (Packagist): affected from 4.0.0; fixed in 4.3.1

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/GHSA-5j8p-438x-rgg5/ (Markdown: https://insights.sbomify.com/GHSA-5j8p-438x-rgg5/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-5j8p-438x-rgg5

---
From sbomify Insights: https://insights.sbomify.com/GHSA-5j8p-438x-rgg5/
Summaries are generated and may contain mistakes; the official description above is the record.
