Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2025-31481 — core

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-863 NVD
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

GraphQL query operations security can be bypassed

Summary

Using the Relay special node type you can bypass the configured security on an operation.

Details

Here is an example of how to apply security configurations for the GraphQL operations:

```php

#[ApiResource(

security: "is_granted('ROLE_USER')",

operations: [ /* ... */ ],

graphQlOperations: [

new Query(security: "is_granted('ROLE_USER')"),

//...

],

)]

class Book { /* ... */ }

```

This indeed checks is_granted('ROLE_USER') as expected for a GraphQL query like the following:

```php

‌query {

book(id: "/books/1") {

title

}

}

```

But the security check can be bypassed by using the node field (that is available by default) on the root query type like that:

```php

‌query {

node(id: "/books/1") {

... on Book {

title

}

}

}

```

This does not execute any security checks and can therefore be used to access any entity without restrictions by everyone that has access to the API.

Impact

Everyone using GraphQl with the security attribute. Not sure whereas this works with custom resolvers nor if this also applies on mutation.

Patched at https://github.com/api-platform/core/commit/60747cc8c2fb855798c923b5537888f8d0969568

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity none, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: None.
  • Availability impact: None.

Weakness class

CVE-2025-31481 is classified as CWE-863: Incorrect Authorization. An authorisation check runs but reaches the wrong conclusion, permitting actions it should refuse.

Affected software

CVE-2025-31481 is recorded against 3 packages.

  • api-platform/core (from 4.1.0-alpha.1 up to 4.1.5)
  • api-platform/graphql (from 4.1.0-alpha.1 up to 4.1.5)
  • unknown

Timeline and source

Published on 4 April 2025 and last revised on 29 August 2025. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Web)
github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)
github.com (Web)

Other advisories for this package

api-platform/core has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-863: Incorrect Authorization) in other software:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CWE CWE-863
Public Exploit ✅ No
Source NVD
Published 2025-04-04
Updated 2026-08-20
Modified 2025-08-29
Fix URL N/A

Affected Packages

Software From version Fixed in
api-platform/core 4.1.0-alpha.1 4.1.5
api-platform/graphql 4.1.0-alpha.1 4.1.5
unknown

Similar Threats

Site Security Check

Is core part of your stack?

CVE-2025-31481 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2025