CVE-2023-37260: League/oauth2 server League/oauth2-server Key Exposed Vulnerability
HIGHCVE-2023-37260 is a HIGH (CVSS 8.2) league/oauth2-server key exposed vulnerability (CWE-209: Generation of Error Message Containing Sensitive Information) affecting League/oauth2 server libraries in the Packagist ecosystem. The issue involves league/oauth2-server key exposed in exception message when passing as a string and providing an invalid pass phrase. Remediation is available by upgrading affected packages to version 8.4.2, 8.5.3.
CVE-2023-37260 at a Glance
Security Impact
CVSS: 8.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N).
How to Fix CVE-2023-37260
To remediate this vulnerability, upgrade all affected League/oauth2 server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade league/oauth2-server to 8.4.2
Upgrade league/oauth2-server to 8.5.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for league/oauth2-server
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-37260, inspect your project dependencies for League/oauth2 server:
inspect dependencies for league/oauth2-server
Analyze the terminal output to locate any version of League/oauth2 server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.4.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-209: Generation of Error Message Containing Sensitive Information, where the product generates an error message that includes sensitive information about its environment, users, or associated data. In League/oauth2 server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-37260 Affected League/oauth2 server Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
league/oauth2-server
|
Packagist |
≥ 8.3.2
< 8.4.2
|
8.4.2
|
|
league/oauth2-server
|
Packagist |
≥ 8.5.0
< 8.5.3
|
8.5.3
|
References
Frequently Asked Questions
What is CVE-2023-37260?
Which League/oauth2 server versions are affected?
What version fixes CVE-2023-37260?
Is league/oauth2-server affected?
What is the CVSS score of CVE-2023-37260?
What CWE is associated with CVE-2023-37260?
How can I check Packagist dependencies for CVE-2023-37260?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wj7q-gjg8-3cpm",
"modified" : "2023-08-03T16:56:42Z",
"published" : "2023-07-06T21:07:27Z",
"aliases" : [ "CVE-2023-37260" ],
"summary" : "league/oauth2-server key exposed in exception message when passing as a string and providing an invalid pass phrase",
"details" : "### Impact\nServers 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. \n\n### Patches\nThis 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 or 8.4.2 to receive the patch.\n\n### Workarounds\nWe recommend upgrading the oauth2-server to one of the patched releases (8.5.3 or 8.4.2). If you are unable to upgrade you can avoid this security issue by passing your key as a file instead of a string.\n\n### References\n* [Fix for 8.4.x](https://github.com/thephpleague/oauth2-server/pull/1359)\n* [Fix for 8.5.x](https://github.com/thephpleague/oauth2-server/pull/1353)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "league/oauth2-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.3.2"
}, {
"fixed" : "8.4.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "league/oauth2-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.5.0"
}, {
"fixed" : "8.5.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/thephpleague/oauth2-server/security/advisories/GHSA-wj7q-gjg8-3cpm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-37260"
}, {
"type" : "WEB",
"url" : "https://github.com/thephpleague/oauth2-server/pull/1353"
}, {
"type" : "WEB",
"url" : "https://github.com/thephpleague/oauth2-server/pull/1359"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/thephpleague/oauth2-server"
}, {
"type" : "WEB",
"url" : "https://github.com/thephpleague/oauth2-server/releases/tag/8.5.3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200", "CWE-209" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-06T21:07:27Z",
"nvd_published_at" : "2023-07-06T16:15:10Z"
}
}