Wiz rejoint Google Cloud : Faire de la magie ensemble

GHSA-crpp-mf59-rhpq: 
PHP Analyse et atténuation de la vulnérabilité

Summary

In the Laravel integration, AccessCheckerProvider is the outermost provider. It decorates ParameterProvider, then SecurityParameterProvider, then ValidateProvider, then DeserializeProvider, then SwaggerUiProvider, then ReadProvider. It calls the decorated chain first and only then passes the result to Gate::allows($policy, $object). For PATCH, and for PUT with standard_put=false, the controller sets ASSIGN_OBJECT_TO_POPULATE, so DeserializeProvider writes the request body into the same Eloquent model ReadProvider loaded. For a standard PUT the object is built entirely from the request. The policy therefore sees attacker-chosen attribute values, not the stored record. The unmodified clone (previous_data) is never given to the policy. A typical ownership policy such as update(User $u, Book $b) { return $u->id === $b->user_id; } can be satisfied by sending user_id = the attacker's id. PersistProcessor then saves the modified record. The Symfony integration does not have this problem: its security check decorates the read provider and runs before deserialization.

  • Severity: medium
  • Weakness: CWE-863
  • Location: src/Laravel/State/AccessCheckerProvider.php:56 at commit f37d6d101fb9a8c055748e51e90ada64dac73979
  • Reachable from: HTTP PATCH or PUT /api/{resource}/{id} on any Laravel API Platform Eloquent resource whose model has a registered Policy, which is auto-attached as the operation policy. GraphQL mutations and MCP tools on Laravel use the same provider chain.

Details

src/Laravel/ApiPlatformProvider.php:508-509 builds new AccessCheckerProvider($app->make(ParameterProvider::class), ...). src/Laravel/ApiPlatformDeferredProvider.php:149-160 makes ParameterProvider wrap ParameterValidatorProvider(SecurityParameterProvider(ValidateProvider)). ApiPlatformProvider.php:487-495 has ValidateProvider wrap DeserializeProvider, and lines 479-485 have DeserializeProvider wrap SwaggerUiProvider, which wraps ReadProvider. src/Laravel/State/AccessCheckerProvider.php:45 runs $body = $this->decorated->provide(...), line 52 sets 'object' => $body, and line 56 calls isGranted. src/Laravel/Controller/ApiPlatformController.php:82-88 sets ASSIGN_OBJECT_TO_POPULATE for PATCH and for non-standard PUT. src/State/Provider/DeserializeProvider.php:72-73 sets OBJECT_TO_POPULATE = $data (the loaded model). src/State/Provider/ReadProvider.php:107 saves only a clone as previous_data. src/Laravel/Eloquent/Metadata/Factory/Resource/EloquentResourceCollectionMetadataFactory.php:99-107 auto-assigns Gate::getPolicyFor($model) methods (update, etc.) as operation policies.

How to reproduce

Set up a Laravel app with an Eloquent Book resource (writable user_id attribute or user relation) and a BookPolicy::update returning $user->id = $book->user_id. Authenticate as user B and send PATCH /api/books/{id of a book owned by user A} with Content-Type application/merge-patch+json and body {"user_id": <B's id>, "title": "x"}. The policy sees user_id B and allows the request, and the book is saved with B as owner and the new title. Without user_id in the body the same request returns 403.

Impact

An authenticated low-privilege user can modify, and take ownership of, other users' records on any resource whose policy decides access from attributes the client can write (owner/tenant/team ids, status flags). This is the default way Laravel policies are written, and API Platform attaches them automatically. Because the policy sees the attacker's own ownership values, the write is accepted, which breaks cross-tenant integrity. The same pattern applies to GraphQL mutations and MCP tools on Laravel.

Suggested remediation

Evaluate the operation policy on the persisted state before deserialization. Either place the access check directly around ReadProvider, as the Symfony bundle does with security, or pass the previous_data clone (request attribute 'previous_data') as the policy's object for item write operations. If a post-denormalize check is wanted, add it as a separate, clearly named option, like Symfony's securityPostDenormalize. Apply the same reordering to the Laravel GraphQL and MCP provider chains, and add a regression test where a PATCH tries to change the owner field.

Limitations

Static review only; not reproduced at runtime. Exploitation needs the attribute the policy checks (e.g. user_id or a relation) to be writable through the API's denormalization: visible, fillable, and in the denormalization groups. If it is read-only, the attacker cannot satisfy the policy. Policies based only on the authenticated user (roles) are not affected. I did not confirm whether documentation tells users to check the stored state via previous_data, but previous_data is not passed to the Gate.

This issue was found with an AI-assisted review (Claude) and verified by a second automated pass. It was reviewed and sent by @orshih6, who has not published it anywhere. Happy to answer questions or help with the fix, and to follow your disclosure timeline.


Source: NVD

Connexe PHP Vulnérabilités :

CVE ID

Gravité

Partition

Technologies

Nom du composant

Exploit CISA KEV

A corrigé

Date de publication

GHSA-hg3m-q4fj-ggmqCRITICAL9.3
  • PHP logoPHP
  • wallabag/wallabag
NonNonNov 20, 2026
CVE-2026-63012MEDIUM6.5
  • PHP logoPHP
  • baserproject/baser-core
NonOuiNov 19, 2026
GHSA-crpp-mf59-rhpqMEDIUMN/A
  • PHP logoPHP
  • api-platform/core
NonOuiNov 20, 2026
GHSA-9wh3-m3m5-jffxMEDIUMN/A
  • PHP logoPHP
  • nowo-tech/transaction-doctrine
NonOuiNov 20, 2026
GHSA-65w2-9r4h-848gMEDIUMN/A
  • PHP logoPHP
  • nowo-tech/transaction-doctrine
NonOuiNov 20, 2026

Évaluation gratuite des vulnérabilités

Évaluez votre posture de sécurité cloud

Évaluez vos pratiques de sécurité cloud dans 9 domaines de sécurité afin d’évaluer votre niveau de risque et d’identifier les lacunes dans vos défenses.

Évaluation de la demande

Ressources Wiz supplémentaires

Obtenez une démo personnalisée

Prêt(e) à voir Wiz en action ?

"La meilleure expérience utilisateur que j’ai jamais vue, offre une visibilité totale sur les workloads cloud."
David EstlickRSSI
"Wiz fournit une interface unique pour voir ce qui se passe dans nos environnements cloud."
Adam FletcherChef du service de sécurité
"Nous savons que si Wiz identifie quelque chose comme critique, c’est qu’il l’est réellement."
Greg PoniatowskiResponsable de la gestion des menaces et des vulnérabilités