CVE-2026-42202: 
PHP vulnerability analysis and mitigation

Overview

CVE-2026-42202 is an improper authorization vulnerability in the nova-toggle-5 Laravel Nova package (by almirhodzic) that allows any authenticated user on the configured guard to flip boolean attributes on any Nova resource model — even without Nova admin access. It affects all versions prior to 1.3.0. The vulnerability was disclosed on April 20, 2026, via a GitHub Security Advisory, and published to NVD on May 8, 2026. It carries a CVSS v3.1 base score of 6.5 (Medium) (GitHub Advisory, Feedly).

Technical details

The root cause is CWE-285 (Improper Authorization): the toggle endpoint (POST /nova-vendor/nova-toggle/toggle/{resource}/{resourceId}) was protected only by web + auth:<guard> middleware, with no enforcement of Nova's own access controls such as the viewNova gate or resource-level authorizedToUpdate policies. Additionally, the endpoint accepted an arbitrary attribute parameter, meaning any authenticated caller could toggle any boolean column on the underlying Eloquent model — not just fields explicitly declared as Toggle fields on the Nova resource. This creates a horizontal privilege escalation scenario where, for example, frontend customers sharing the same authentication guard as the Nova admin area could manipulate admin-facing boolean flags (GitHub Advisory).

Impact

Successful exploitation allows any authenticated user — including non-admin frontend users — to arbitrarily toggle boolean columns on any Nova resource model in the database, with no confidentiality impact but a high integrity impact. This could be used to escalate privileges (e.g., toggling an is_admin flag), disable security controls, activate or deactivate user accounts, or corrupt application state. There is no availability impact and no data exposure, but the integrity risk to application data and access control logic is significant (GitHub Advisory, Feedly).

Exploitability

No public exploit code or in-the-wild exploitation has been reported for CVE-2026-42202. The EPSS score is approximately 0.026% (very low probability of exploitation in the near term). The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires only low-privilege authentication (any valid session on the configured guard), making it accessible to a broad set of potential attackers in multi-tenant or mixed-audience deployments (GitHub Advisory, Feedly).

Exploitation steps

  1. Reconnaissance: Identify a Laravel application using the almirhodzic/nova-toggle-5 package (version < 1.3.0) with a Nova admin panel. Look for the /nova-vendor/nova-toggle/ route prefix in HTTP responses or JavaScript assets.
  2. Authenticate: Obtain any valid session on the application's configured authentication guard — this could be a regular frontend user account, not necessarily a Nova admin.
  3. Enumerate Nova resources: Identify valid Nova resource names and resource IDs (e.g., users, posts) by observing the Nova admin panel's API calls or application behavior.
  4. Craft the toggle request: Send a POST request to /nova-vendor/nova-toggle/toggle/{resource}/{resourceId} with an attribute parameter set to any boolean column name on the target model (e.g., is_admin, is_active, email_verified).
  5. Achieve unauthorized data modification: The server processes the request without checking Nova authorization, toggling the specified boolean column on the target record — potentially granting elevated privileges or altering application state (GitHub Advisory).

Indicators of compromise

  • Network: Unexpected POST requests to /nova-vendor/nova-toggle/toggle/* originating from non-admin user sessions or unusual IP addresses.
  • Logs: Laravel access logs showing POST requests to the toggle endpoint from authenticated users who are not Nova administrators; requests with attribute values that do not correspond to declared Toggle fields on the resource.
  • Database: Unexplained changes to boolean columns (e.g., is_admin, is_active, is_verified) on user or resource records, particularly outside of normal admin activity windows.
  • Application: Unexpected privilege escalation events, such as frontend users gaining admin access or accounts being activated/deactivated without admin action (GitHub Advisory).

Mitigation and workarounds

The vulnerability is fixed in nova-toggle-5 version 1.3.0, which enforces Nova's nova:api middleware (including the viewNova gate), checks the resource's authorizedToUpdate policy, and restricts toggling to attributes explicitly declared as Toggle fields that are not readonly. Upgrade by running composer update almirhodzic/nova-toggle-5. For those unable to upgrade immediately, the advisory recommends either removing the package entirely or adding custom middleware to the /nova-vendor/nova-toggle/toggle/* routes that enforces the viewNova gate. Note that the config/nova-toggle-5.php config file and its guards option have been removed in v1.3.0 and can be safely deleted after upgrading (GitHub Advisory, GitHub Release).

Community reactions

The vulnerability was responsibly disclosed by security researcher Roberto Negro and credited in both the GitHub Security Advisory and the v1.3.0 release notes. No significant broader media coverage or notable community commentary beyond the advisory itself has been identified (GitHub Advisory, GitHub Release).

Additional resources


Source: This report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-hx92-2qxg-m977HIGH7.8
  • PHP logoPHP
  • ray/aop
NoYesNov 21, 2026
GHSA-p5q8-69rj-ff33HIGH7.8
  • PHP logoPHP
  • ray/di
NoYesNov 21, 2026
GHSA-vpqj-26g5-4qqmHIGH7.4
  • PHP logoPHP
  • simplesamlphp/saml2
NoNoNov 22, 2026
GHSA-2g6w-c7gx-fxj8MEDIUM5.4
  • PHP logoPHP
  • guzzlehttp/guzzle
NoYesNov 21, 2026
GHSA-m9j4-54gj-jvf8MEDIUM5.3
  • PHP logoPHP
  • league/csv
NoYesNov 22, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management