Skip to content
Security advisoryCVE-2023-47639

API Platform Core can leak exceptions message that may contain sensitive information

Moderate5.3Published Modified Original advisory

As published by the sources

Affected packages

Derived from the fixed versions above

What to do

  1. Upgrade api-platform/core to 3.2.5 or later.

    composer update api-platform/core --with-dependencies

To see which version you have installed, run composer show vendor/package. Running composer audit lists the known advisories that match your installed versions.

Quoted from the original advisory

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.

References

laravel.now is an independent community project. It is not affiliated with, endorsed by, sponsored by, or in any way officially connected to Laravel, Laravel LLC, Taylor Otwell, or the Laravel framework maintainers. Laravel is a trademark of Taylor Otwell. All other trademarks belong to their respective owners.

This site is operated by the makers of Lockhound. Links to Lockhound are promotional.