Hoch

GraphQL query operations security can be bypassed

  • Veröffentlicht: 04.04.2025
  • Aktualisiert: 11.10.2026 10:22

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

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Composer-Paket api-platform/core >= 4.0.0-alpha.1, < 4.0.22, < 3.4.17, >= 4.1.0-alpha.1, < 4.1.5 4.0.22, 3.4.17, 4.1.5
Composer-Paket api-platform/graphql >= 4.0.0-alpha.1, < 4.0.22, < 3.4.17, >= 4.1.0-alpha.1, < 4.1.5 4.0.22, 3.4.17, 4.1.5

Verweise

CVSS-Wert 7.5/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Schwäche (CWE)
CWE-863
Plattform
Composer
Paket
api-platform/core, api-platform/graphql
Veröffentlicht
04.04.2025
Aktualisiert
11.10.2026 10:22

Quellen und Lizenzen

OSV / GitHub Advisory Database - GHSA-cg3c-245w-728m - CC BY 4.0

Schwachstellenhistorie: api-platform/core

Alle veröffentlichten Schwachstellen dieses Pakets (Composer-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Einträge insgesamt
8
Erste → letzte
10.2019 08.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Hoch 3
  • Mittel 5

Veröffentlichungen pro Jahr

  1. 2019: 1
  2. 2020: 0
  3. 2021: 0
  4. 2022: 0
  5. 2023: 1
  6. 2024: 0
  7. 2025: 4
  8. 2026: 2
  1. Mittel · 6.5 CVE-2026-54164 < 4.1.30, >= 4.2.0, < 4.2.26, >= 4.3.0, < 4.3.12 4.1.30, 4.2.26, 4.3.12
  2. Mittel · 5.9 CVE-2026-49858 >= 2.6.0, < 4.1.29, >= 4.2.0, < 4.2.25, >= 4.3.0, < 4.3.8 4.1.29, 4.2.25, 4.3.8
  3. Hoch · 7.5 CVE-2025-31485 >= 4.0.0-alpha.1, < 4.0.22, < 3.4.17, >= 4.1.0-alpha.1, < 4.1.5 4.0.22, 3.4.17, 4.1.5
  4. GraphQL query operations security can be bypassed dieser Eintrag
    Hoch · 7.5 CVE-2025-31481 >= 4.0.0-alpha.1, < 4.0.22, < 3.4.17, >= 4.1.0-alpha.1, < 4.1.5 4.0.22, 3.4.17, 4.1.5
  5. Mittel · 4.4 CVE-2025-23204 >= 3.3.8, < 3.3.15 3.3.15
  6. Hoch · 7.7 CVE-2023-25575 >= 3.0.0, < 3.0.12, >= 3.1.0, < 3.1.3, >= 2.6.0, < 2.7.10 3.0.12, 3.1.3, 2.7.10
  7. Mittel · 6.5 CVE-2019-1000011 >= 2.2.0, < 2.2.10, >= 2.3.0, < 2.3.6 2.2.10, 2.3.6

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.