The CVSS 6.5 rating for CVE-2026-88028 badly undersells the risk. This isn't a moderate information disclosure flaw — it's a fracture in the authorization boundary that polymorphic relations are supposed to enforce.

In Laravel's native Eloquent, when code resolves a polymorphic relation like Comment->commentable, the morph type string ('App\Models\Post') passes through resolveRelation(), which verifies the class exists before any database interaction. This is a typed resolution pipeline. The Laravel MongoDB package reimplemented this pipeline for MongoDB's document model, but in doing so, it replaced typed resolution with raw string interpolation in MongoDB queries. That's where the vulnerability lives: user-controlled morph type values get interpolated directly into query documents rather than being treated as typed relation targets.

The exploit is deceptively simple. An attacker who can influence a stored polymorphic relation identifier — which in many applications is just a matter of controlling an 'entity_type' or 'commentable_type' field — can inject MongoDB query operators as the morph type. Payloads like '$ne: null' or '$regex' become valid relation identifiers. When the application resolves the polymorphic relation, it doesn't return the intended target; it returns whatever document matches the injected query condition. The calling code expected a Comment's associated Post or User; it gets data from an entirely different relation type it never authorized access to.

This is the critical point the CVSS misses: polymorphic relations in many Laravel applications are the authorization boundary. Code checks 'can the user access this Comment' but never verifies 'can the user access whatever this Comment resolves to.' When you poison the morph type, you're not leaking one record — you're bypassing a class of authorization checks that assumed resolving the relation was equivalent to confirming access. In multi-tenant systems where polymorphic relations tie tenant-specific models together, this assumption is load-bearing.

The MongoDB package made this tradeoff explicitly: maintaining Laravel's type-safety semantics would require mapping every MongoDB document to a PHP class before resolution, which they considered too slow for their schema-flexible model. That decision is understandable from a performance perspective. But it means every Laravel application using MongoDB with polymorphic relations has inherited an authorization architecture that is safe only by convention, not by construction.

What you should do: audit every polymorphic relation in your application where the morph type is stored in a user-influenced field. If your code resolves a polymorphic relation and then immediately accesses properties on the resolved model without re-authorizing, that's your exposure. Consider adding explicit type-checking after polymorphic resolution — verify the resolved model is an instance of what you expected before acting on it. The vulnerability is in the MongoDB package, but the architectural assumption that polymorphic resolution equals authorization confirmation is in your application code, and that's what the CVE can't patch.