# GHSA-hx5q-v6pj-533r: SAML authentication bypass due to missing validation on unsigned SAML messages

> Attackers can bypass authentication by forging unsigned SAML messages in Central Dogma when SAML is enabled, 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:** 26 Feb 2024

## What is GHSA-hx5q-v6pj-533r?

GHSA-hx5q-v6pj-533r is an authentication bypass vulnerability in com.linecorp.centraldogma:centraldogma-server-auth-saml, published on 26 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact

When SAML is used as the authentication mechanism, Central Dogma accepts unsigned SAML messages (assertions, logout requests, etc.) as they are, rather than rejecting them by default. As a result, an attacker can forge a SAML message to authenticate themselves, despite the fact that such an unsigned SAML message should be rejected.

### Patches

The vulnerability has been patched in Central Dogma 0.64.3 by updating its Armeria dependency to 1.27.2. All users who use SAML as the authentication mechanism must upgrade from 0.64.3 or later.

### Workarounds

A user can manually upgrade the `armeria-saml` module with the one from Armeria 1.27.2 or later, either by replacing the JAR in the Central Dogma distribution or by updating the dependency tree of the build.

### References

[`SamlMessageUtil.validateSignature()`](https://github.com/line/armeria/blob/0efc776988d71be4da6e506ec8a33c2b7b43f567/saml/src/main/java/com/linecorp/armeria/server/saml/SamlMessageUtil.java#L160-L163)

## Which versions are affected by GHSA-hx5q-v6pj-533r?

2 open source packages ship an affected version, including com.linecorp.centraldogma:centraldogma-server-auth-saml.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.linecorp.centraldogma:centraldogma-server-auth-saml` | Maven | All versions | 0.64.3 |
| `com.linecorp.centraldogma:centraldogma-server-auth-saml` | Maven | All versions | 0.64.3 |

## How do I fix GHSA-hx5q-v6pj-533r?

Upgrade com.linecorp.centraldogma:centraldogma-server-auth-saml to 0.64.3 or later.

## Is GHSA-hx5q-v6pj-533r being exploited?

There is no known exploitation of GHSA-hx5q-v6pj-533r in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-hx5q-v6pj-533r and fix it if it is affected.

What it is: GHSA-hx5q-v6pj-533r is an authentication bypass vulnerability in com.linecorp.centraldogma:centraldogma-server-auth-saml, published on 26 Feb 2024. 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-hx5q-v6pj-533r in the wild and no public exploit code.

Affected packages and fixed versions:
- com.linecorp.centraldogma:centraldogma-server-auth-saml (Maven): affected all versions; fixed in 0.64.3
- com.linecorp.centraldogma:centraldogma-server-auth-saml (Maven): affected all versions; fixed in 0.64.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/GHSA-hx5q-v6pj-533r/ (Markdown: https://insights.sbomify.com/GHSA-hx5q-v6pj-533r/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-hx5q-v6pj-533r

---
From sbomify Insights: https://insights.sbomify.com/GHSA-hx5q-v6pj-533r/
Summaries are generated and may contain mistakes; the official description above is the record.
