# CVE-2019-10755: Use of Cryptographically Weak Pseudo-Random Number Generator in org.pac4j:pac4j-saml

> Predictable SAML identifiers due to weak random number generation allow attackers to bypass authentication in the pac4j-saml library.

- **Severity:** Medium 4.9 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Sep 2019
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-rc75-cf5c-mxvh, SNYK-JAVA-ORGPAC4J-467407

## What is CVE-2019-10755?

CVE-2019-10755 is a medium-severity vulnerability in PAC4J For SAML Protocol, published on 23 Sep 2019. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

The SAML identifier generated within SAML2Utils.java was found to make use of the apache commons-lang3 RandomStringUtils class which makes them predictable due to RandomStringUtils PRNG's algorithm not being cryptographically strong. This issue only affects the 3.X release of pac4j-saml.

Weakness: CWE-338 (Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG))

## Which versions are affected by CVE-2019-10755?

2 open source packages ship an affected version, including org.pac4j:pac4j-saml. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.pac4j:pac4j-saml` | Maven | All versions | 3.8.2 |
| `org.pac4j:pac4j-saml` | Maven | All versions | 3.8.2 |

Products: Pac4j Pac4j.

## How do I fix CVE-2019-10755?

Upgrade org.pac4j:pac4j-saml to 3.8.2 or later.

## Is CVE-2019-10755 being exploited?

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

## Other vulnerabilities in PAC4J For SAML Protocol

- [CVE-2026-40459](https://insights.sbomify.com/CVE-2026-40459/): LDAP Injection in PAC4J (high 8.7)
- [CVE-2021-44878](https://insights.sbomify.com/CVE-2021-44878/): Pac4j token validation bypass if OpenID Connect provider supports none algorithm (high 7.5)
- [CVE-2026-40458](https://insights.sbomify.com/CVE-2026-40458/): Cross-Site Request Forgery in PAC4J (high 7.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-10755 and fix it if it is affected.

What it is: CVE-2019-10755 is a medium-severity vulnerability in PAC4J For SAML Protocol, published on 23 Sep 2019. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2019-10755 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.pac4j:pac4j-saml (Maven): affected all versions; fixed in 3.8.2
- org.pac4j:pac4j-saml (Maven): affected all versions; fixed in 3.8.2

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

## Sources

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

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