GHSA-7mxx-3cgm-xxv3

Suggest an improvement
Source
https://github.com/advisories/GHSA-7mxx-3cgm-xxv3
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/03/GHSA-7mxx-3cgm-xxv3/GHSA-7mxx-3cgm-xxv3.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-7mxx-3cgm-xxv3
Aliases
Published
2025-03-24T16:31:08Z
Modified
2025-03-24T18:56:56.970231Z
Severity
  • 4.4 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:L/I:L/A:N CVSS Calculator
Summary
API Platform Core does not call GraphQl securityAfterResolver
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

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 https://github.com/api-platform/core/pull/6444 is probably broken.

Database specific
{
    "nvd_published_at": "2025-03-24T16:15:56Z",
    "cwe_ids": [
        "CWE-20",
        "CWE-484"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2025-03-24T16:31:08Z"
}
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.3.8
Fixed
3.3.15

Affected versions

v3.*

v3.3.8
v3.3.9
v3.3.10
v3.3.11
v3.3.12
v3.3.13
v3.3.14