GHSA-rfw5-cqjj-7v9r

Suggest an improvement
Source
https://github.com/advisories/GHSA-rfw5-cqjj-7v9r
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/04/GHSA-rfw5-cqjj-7v9r/GHSA-rfw5-cqjj-7v9r.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-rfw5-cqjj-7v9r
Aliases
Published
2025-04-03T13:02:57Z
Modified
2025-04-04T02:19:23.638250Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N CVSS Calculator
Summary
API Platform Core can leak exceptions message that may contain sensitive information
Details

Summary

Exception messages, that are not HTTP exceptions, are visible in the JSON error response.

Details

While we wanted to make our errors compatible with the JSON Problem specification, we ended up handling more exceptions then we did previously (introduced at https://github.com/api-platform/core/pull/5823). Instead of leaving that to Symfony, we ended up serializing errors with our normalizers which lead to not hiding the exception details. Note that the trace is hidden in production but the message is not, and the message can contain sensitive information.

PoC

At https://github.com/ili101/api-platform/tree/test3.2 it triggers an authentication exception as LDAP is not reachable. You can find the message available as a JSON response when trying to reach an endpoint.

Impact

Version 3.2 until 3.2.4 is impacted.

Database specific
{
    "nvd_published_at": "2025-04-03T17:15:30Z",
    "cwe_ids": [
        "CWE-209"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2025-04-03T13:02:57Z"
}
References

Affected packages

Packagist / api-platform/core

Package

Name
api-platform/core
Purl
pkg:composer/api-platform/core

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.2.0
Fixed
3.2.5

Affected versions

v3.*

v3.2.0
v3.2.1
v3.2.2
v3.2.3
v3.2.4