CVE-2026-135145 in PHP Driverinfo

Summary

by MITRE • 11/25/2026

A polymorphic relationship query helper in the MongoDB Eloquent integration for Laravel resolves a record's type identifier inconsistently between the code that stores a relationship link and the code that searches for one. An application that relies on a relationship-absence query to restrict which records a request may see or change can therefore have that restriction silently fail, allowing a user with basic application privileges to read and to modify or remove records the restriction was meant to cover.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 11/25/2026

The vulnerability described constitutes a critical logic flaw within the MongoDB Eloquent integration for Laravel, specifically affecting how polymorphic relationships are resolved during query construction. In web applications utilizing this stack, polymorphic relationships allow a single model to belong to multiple other models through a shared interface, typically managed via type identifiers and foreign keys stored in database records. The core technical failure lies in an inconsistency between the logic used when persisting these relationship links and the logic employed when querying for their absence. When storing a record that defines such a relationship, the system correctly identifies and writes the specific class name or type identifier associated with the related entity. However, during subsequent search operations, particularly those designed to find records where no relationship exists, the resolution mechanism fails to match this stored identifier against the query parameters using a consistent method. This discrepancy means that the database engine receives queries that do not accurately reflect the actual state of the data due to mismatched type string comparisons or normalization issues inherent in how MongoDB handles these specific field types versus standard SQL relational databases.

This architectural inconsistency leads directly to a severe authorization bypass, categorized under CWE-269 Improper Privilege Management and CWE-862 Missing Authorization. The operational impact is most acute when applications rely on relationship-absence queries to enforce security boundaries. For instance, an application might use a query like whereDoesntHave to ensure that only users without specific administrative links can access certain resources or perform actions. Because the polymorphic resolution fails consistently during these searches, the database returns records that should have been excluded by the restriction logic. Consequently, the application framework interprets this incorrect result set as valid data for the current user context. This allows an attacker with basic, low-privilege credentials to bypass access controls and interact with sensitive objects intended only for higher-level roles or other users. The ability to read, modify, or delete these restricted records represents a complete compromise of the application's integrity and confidentiality guarantees.

From a threat modeling perspective aligned with MITRE ATT&CK techniques, this vulnerability facilitates lateral movement within the application logic and potentially data exfiltration if sensitive information is exposed through the improperly accessed records. It also enables privilege escalation by allowing lower-privileged actors to manipulate high-value assets that were supposed to be isolated from their scope of influence. The silent nature of this failure makes it particularly dangerous, as standard logging mechanisms may not immediately flag unauthorized access attempts since the application believes it is enforcing its security policies correctly while actually failing to do so. Attackers can exploit this by crafting requests that trigger these specific polymorphic queries, systematically probing for resources they should not have visibility into and then executing destructive or manipulative operations against them.

Mitigation strategies must address both the immediate code defect and broader architectural patterns surrounding data access control. The primary remediation involves correcting the polymorphic relationship resolution logic in the MongoDB Eloquent integration to ensure that type identifiers are normalized, compared, and stored using a consistent method across all read and write operations. Developers should audit all instances where polymorphic relationships are queried for absence or presence and verify that the query builder constructs filters that accurately match the database schema's expectations. Additionally, implementing strict server-side validation checks that do not rely solely on ORM-level relationship constraints can provide defense in depth. It is also advisable to review access control lists (ACLs) at the controller level rather than relying exclusively on model-level relationships for security decisions, ensuring that even if a query flaw exists, the application layer still enforces proper permissions based on explicit role checks and resource ownership verification.

Responsible

Mongodb

Reservation

11/23/2026

Disclosure

11/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00553

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!