API Platform Core does not call GraphQl securityAfterResolver
As published by the sources
Affected packages
- Affected
>=3.3.8,<3.3.15Fixed in3.3.15
Derived from the fixed versions above
What to do
Upgrade api-platform/core to 3.3.15 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
A security check that gets called after GraphQl resolvers is always replaced by another one as there's no break in this clause: https://github.com/api-platform/core/pull/6444/files#diff-09e3c2cfe12a2ce65bd6c983c7ca6bfcf783f852b8d0554bb938e8ebf5e5fa65R56
PoC
Create a graphql endpoint with a security after resolver.
Impact
As this fallsback to security, the impact is there only when there's only a security after resolver and none inside security. The test at https://github.com/api-platform/core/pull/6444 is probably broken.
References
- Advisoryhttps://github.com/advisories/GHSA-7mxx-3cgm-xxv3
- Webhttps://github.com/api-platform/core/security/advisories/GHSA-7mxx-3cgm-xxv3
- Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2025-23204
- Webhttps://github.com/api-platform/core/pull/6444
- Webhttps://github.com/api-platform/core/pull/6444/files#diff-09e3c2cfe12a2ce65bd6c983c7ca6bfcf783f852b8d0554bb938e8ebf5e5fa65R56
- Webhttps://github.com/api-platform/core/commit/dc4fc84ba93e22b4f44a37e90a93c6d079c1c620
- Packagehttps://github.com/api-platform/core
- Webhttps://github.com/soyuka/core/blob/7e2e8f9ff322ac5f6eb5f65baf432bffdca0fd51/src/Symfony/Security/State/AccessCheckerProvider.php#L49-L57