API Platform Core does not call GraphQl securityAfterResolver
Moderate severity
GitHub Reviewed
Published
Mar 24, 2025
in
api-platform/core
•
Updated Mar 24, 2025
Description
Published by the National Vulnerability Database
Mar 24, 2025
Published to the GitHub Advisory Database
Mar 24, 2025
Reviewed
Mar 24, 2025
Last updated
Mar 24, 2025
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
https://github.com/soyuka/core/blob/7e2e8f9ff322ac5f6eb5f65baf432bffdca0fd51/src/Symfony/Security/State/AccessCheckerProvider.php#L49-L57
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 api-platform/core#6444 is probably broken.References