CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-F5C8-M5VW-RMGQ

GHSA-F5C8-M5VW-RMGQ: Improper Authorization in almirhodzic/nova-toggle-5

Alon Barad
Alon Barad
Software Engineer

Apr 24, 2026·6 min read·16 visits

Executive Summary (TL;DR)

A broken access control vulnerability in a Laravel Nova toggle component allows standard authenticated users to bypass administrative policies and flip sensitive database boolean fields (like `is_admin` or `is_active`) via a poorly protected API endpoint.

The `almirhodzic/nova-toggle-5` package for Laravel Nova fails to properly enforce authorization checks on its API toggle endpoint. This allows any authenticated user to arbitrarily modify boolean fields on any database model exposed through the Nova administration panel, leading to severe broken access control and potential privilege escalation.

Vulnerability Overview

The almirhodzic/nova-toggle-5 package is a popular extension for the Laravel Nova administration panel. It provides a user interface element that allows administrators to toggle boolean database fields directly from the resource index view. The package operates by registering a custom API endpoint that receives toggle commands from the frontend application.

This vulnerability, classified as Improper Authorization (CWE-285/CWE-862), exists within the routing and middleware configuration of that specific API endpoint. The underlying issue stems from a failure to validate the administrative context of the incoming request. The route enforces standard web authentication but fails to verify if the user possesses Laravel Nova access privileges or if they are authorized by specific resource update policies.

The security impact of this design flaw is severe. Any user possessing a valid session on the target application can programmatically manipulate the application state. Depending on the database schema, this typically leads to horizontal or vertical privilege escalation, as attackers can toggle sensitive flags governing access controls, user statuses, or feature availability.

Root Cause Analysis

The defect originates in the route registration mechanics of the nova-toggle-5 package. During initialization, the package exposes an API endpoint, typically located at /nova-vendor/nova-toggle-5/toggle, to process asynchronous toggle requests. In versions prior to v1.3.0, this route was protected exclusively by the default web and auth middleware stack provided by Laravel.

This middleware stack is inadequate for protecting administrative functions. The auth middleware successfully validates the presence of an active user session, ensuring the requester is logged into the application. However, it explicitly does not invoke Laravel Nova's gate checks, which are required to verify if the authenticated user is authorized to access the administration dashboard at all.

Furthermore, the endpoint completely bypassed Laravel's robust policy system. Laravel Nova relies on resource-specific policies to control view, create, update, and delete actions for individual models. The vulnerable endpoint accepted a model name, record ID, and field name as parameters, but executed the database update directly without ever invoking the update policy method for the targeted model instance.

Code Analysis & Fix Mechanics

An analysis of the structural flaw reveals a direct object reference vulnerability coupled with broken access control. The controller responsible for the toggle endpoint receives the request payload and dynamically instantiates the target model using the provided resource identifier. The vulnerable implementation blindly inverted the boolean value of the specified field and saved the model directly to the database without any intermediate validation.

A secure implementation within the Laravel ecosystem requires explicit authorization checks prior to state modification. This is typically achieved using $this->authorize('update', $model) or by routing the request through Nova's specific request validation classes. These mechanisms ensure the action respects the application's defined business logic and security policies.

The patch introduced in version v1.3.0 resolves this vulnerability by hardening the route definition. The maintainers modified the endpoint to integrate correctly with Nova's established authorization mechanisms. This integration ensures the endpoint strictly verifies both the user's Nova access privileges and the specific resource update policies before executing the requested state change.

// Conceptual Vulnerable Pattern
$model = $request->resource::find($request->resourceId);
$model->{$request->fieldName} = !$model->{$request->fieldName};
$model->save();
 
// Conceptual Patched Pattern
$model = $request->resource::find($request->resourceId);
Gate::authorize('update', $model); // Enforces Laravel Policy
$model->{$request->fieldName} = !$model->{$request->fieldName};
$model->save();

Exploitation Methodology

Exploitation of this vulnerability requires minimal prerequisites. The attacker must possess valid credentials for any user role within the target application. They also require knowledge of the underlying database schema, specifically the internal names of targeted models and their associated boolean fields, which can often be inferred through standard application usage or open-source intelligence.

The discovery phase involves locating the exposed API endpoint. An attacker can map the endpoint structure by creating a local instance of the application, reviewing the open-source package repository, or analyzing client-side JavaScript interactions. The endpoint invariably expects an HTTP POST or PATCH request containing the resource, resourceId, and fieldName parameters in the payload.

During the execution phase, the attacker constructs a malicious HTTP request utilizing their valid session cookie or bearer token. They target sensitive tables, such as the users table, and specify critical boolean fields like is_admin, is_verified, or is_active alongside a specific user ID. The request is dispatched to the vulnerable /nova-vendor/nova-toggle-5/toggle endpoint.

The server processes the request, passes the standard authentication check, and executes the database update. The attacker successfully elevates their privileges, bypasses verification gates, or disables security features without ever holding administrative access. The attack is highly reliable and requires no user interaction.

Impact Assessment

The primary security consequence of this vulnerability is a critical failure of data integrity controls. An unauthorized user can arbitrarily alter boolean states across any model managed by Nova. This represents a severe violation of the principle of least privilege, allowing low-privileged actors to manipulate core system configurations and user data.

The vulnerability frequently facilitates direct vertical privilege escalation. If the application relies on boolean flags within the user model to designate administrative rights (e.g., an is_admin or is_superuser column), an attacker can trivially grant themselves full administrative access. This compromises the entire application infrastructure and all associated tenant data.

The vulnerability also poses a significant risk to application availability and core business logic. An attacker can iteratively toggle is_active or is_banned flags on competing user accounts, effectively causing a targeted denial of service. Furthermore, they can manipulate feature flags, bypass payment statuses, or alter content visibility controls, directly impacting the operational integrity of the platform.

Remediation & Mitigation

The definitive remediation for this vulnerability is an immediate upgrade of the almirhodzic/nova-toggle-5 package. Administrators must update the dependency to version v1.3.0 or later. This release contains the necessary middleware modifications and policy checks to secure the toggle endpoint against unauthorized access.

The update process is managed via Composer. Developers should execute composer update almirhodzic/nova-toggle-5 within their project environment and deploy the updated lockfile to production. Following the deployment, comprehensive testing of the Nova dashboard is required to ensure legitimate administrative workflows remain functional under the newly enforced policy checks.

The security of the patched version relies entirely on the correct implementation of Laravel resource policies. Developers must audit all policy classes associated with Nova resources, specifically reviewing the update methods. These methods must accurately reflect the organization's access control requirements and explicitly deny access to unauthorized roles.

Security teams should initiate incident response procedures to identify potential historical exploitation. Log analysis should focus on anomalous POST requests directed at the /nova-vendor/nova-toggle-5/toggle endpoint originating from non-administrative user sessions. Database audit trails should also be scrutinized for unexpected modifications to critical boolean fields.

Technical Appendix

CVSS Score
7.1/ 10

Affected Systems

Laravel Novaalmirhodzic/nova-toggle-5

Affected Versions Detail

Product
Affected Versions
Fixed Version
almirhodzic/nova-toggle-5
almirhodzic
< 1.3.01.3.0
AttributeDetail
CWE IDCWE-285
Attack VectorNetwork
ImpactHigh Integrity Loss (Unauthorized Data Modification)
Authentication RequiredYes (Standard User)
Privileges RequiredLow
User InteractionNone

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-285
Improper Authorization

Improper Authorization occurs when a system does not properly restrict access to a resource or function based on the identity and privileges of the requesting actor.

Vulnerability Timeline

Patch Released (Version v1.3.0)
2024-12-10
Advisory Published
2024-12-10

References & Sources

  • [1]GitHub Advisory: GHSA-F5C8-M5VW-RMGQ
  • [2]Release Notes (Fix)
  • [3]Package Repository

More Reports

•38 minutes ago•CVE-2026-65592
8.4

CVE-2026-65592: Stored DOM-based Cross-Site Scripting via cachedResultUrl in n8n

A Stored DOM-based Cross-Site Scripting (XSS) vulnerability exists within the frontend Resource Locator component of n8n. The flaw stems from insecure usage of window.open() where the application evaluates the workflow-persisted parameter 'cachedResultUrl' without verifying its protocol scheme. Authenticated attackers with permissions to create or edit workflows can insert a 'javascript:' URI payload, leading to arbitrary code execution in the victim's browser context upon interaction.

Alon Barad
Alon Barad
0 views•5 min read
•about 2 hours ago•CVE-2026-65599
5.1

CVE-2026-65599: Google Service Account Private Key Leakage via JWT Header Parameter in n8n

A credential exposure vulnerability in n8n (CVE-2026-65599) transmits the complete PEM-formatted Google Service Account private key in the 'kid' (Key ID) parameter of outbound JWT headers during Google API authentication. Because JWT headers are encoded in plain Base64URL and not encrypted, any entity that intercepts, logs, or processes these outbound requests can immediately extract the plaintext private key. This enables unauthorized third parties to fully compromise the corresponding Google Cloud Platform (GCP) service account and access any authorized cloud resources.

Alon Barad
Alon Barad
0 views•7 min read
•about 4 hours ago•CVE-2026-47300
8.8

CVE-2026-47300: Elevation of Privilege in ASP.NET Core Negotiate Authentication Handler

CVE-2026-47300 is a high-severity Elevation of Privilege (EoP) vulnerability in Microsoft's ASP.NET Core framework, affecting the Negotiate Authentication Handler when configured to retrieve security groups and role mappings via an LDAP/Active Directory directory service. In cross-platform Linux and macOS environments where native Windows token group expansion is unavailable, an authenticated attacker with low-privileged network access can manipulate LDAP query structures or force connections to untrusted directory resources, resulting in unauthorized administrative role assignment.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 11 hours ago•CVE-2026-20779
7.1

CVE-2026-20779: TOTP Single-Use Enforcement Defect in Gitea

Gitea versions from 1.5.0 before 1.26.3 contain a security vulnerability in their multi-factor authentication (MFA) logic. This vulnerability allows valid TOTP codes to be accepted multiple times across web authentication flows and the Basic Auth X-Gitea-OTP header path. Due to a TOCTOU race condition and a lack of state tracking in programmatic auth pathways, attackers with valid credentials can replay single-use OTP codes.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 12 hours ago•GHSA-R7WM-3CXJ-WFF9
5.3

GHSA-R7WM-3CXJ-WFF9: StreamReadConstraints Bypass in jackson-core Async Parser

A critical validation bypass exists in FasterXML jackson-core due to an incomplete fix for GHSA-72hv-8253-57qq. When parsing JSON asynchronously using NonBlockingUtf8JsonParserBase, the StreamReadConstraints.maxNumberLength constraint is bypassed when numeric inputs are received in small, non-terminating chunks. The parser continually accumulates digit-only input in an internal buffer without triggering validation constraints, resulting in potential heap memory exhaustion and application-level Denial of Service.

Alon Barad
Alon Barad
9 views•6 min read
•about 13 hours ago•GHSA-2RP8-MM9Q-FP49
8.0

GHSA-2RP8-MM9Q-FP49: Remote Code Execution via Template-Literal Code Injection in TypeORM migration:generate

A critical second-order code injection vulnerability exists in the migration generation engine of TypeORM. When TypeORM introspects a database schema to automatically generate migration files, it writes schema metadata directly into JavaScript/TypeScript migration files inside ES2015 template literals. Because the generator failed to sanitize template literal string interpolation markers and backslashes, attackers with control over database metadata can execute arbitrary code on the developer environment or within a CI/CD pipeline.

Amit Schendel
Amit Schendel
5 views•5 min read