CVE-2026-134397 in ERPNext
Summary
by MITRE • 11/21/2026
Frappe ERPNext 15.10.4 before 15.122.0 and 16.x before 16.50.0 contains a missing authorization vulnerability in a Stock module endpoint that checks whether an inventory number exists and creates missing Serial No and Batch master records without verifying create permission. Authenticated users can send a crafted request with a new number to create these records outside their role, affecting inventory data integrity.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 11/21/2026
The identified security flaw resides within the Stock module of Frappe ERPNext versions prior to 15.122.0 and 16.x prior to 16.50.0, specifically targeting an endpoint responsible for validating the existence of inventory numbers and subsequently generating missing Serial Number or Batch master records. This vulnerability is classified as a Broken Access Control issue, aligning with CWE-862 which denotes Missing Authorization. The core technical deficiency lies in the application logic that performs object creation without adequately verifying whether the authenticated user possesses the necessary permissions to create such records. While the endpoint correctly checks for the existence of an inventory number, it fails to enforce role-based access controls during the instantiation phase, allowing any authenticated user to trigger the creation process regardless of their assigned privileges within the system.
From a technical perspective, this flaw enables attackers who have valid credentials but lack administrative or specific stock management permissions to manipulate critical inventory data structures. By sending a crafted HTTP request containing a new inventory number, an attacker can force the application to automatically generate corresponding Serial No and Batch master records in the database. This bypasses standard workflow validations that would normally require explicit user action with proper authorization checks. The vulnerability exploits the implicit trust placed in authenticated sessions without validating the scope of actions permitted for those specific accounts, a common pattern in legacy or poorly audited enterprise resource planning systems where backend logic assumes frontend restrictions are sufficient security boundaries.
The operational impact of this vulnerability is significant due to its direct effect on inventory data integrity and system reliability. Unauthorized creation of Serial No and Batch records can lead to data pollution within the stock management module, potentially causing discrepancies in stock levels, traceability issues for serialized items, and confusion in batch tracking processes. In environments where strict regulatory compliance or audit trails are required, such unauthorized modifications compromise the accuracy of financial reporting and supply chain visibility. Furthermore, if these newly created records are linked to other transactions through subsequent system operations, it could facilitate more complex attacks involving inventory manipulation, stock theft concealment, or disruption of automated replenishment workflows that rely on accurate master data.
This vulnerability maps directly to MITRE ATT&CK technique T1078 Valid Accounts, as exploitation requires valid authentication credentials, and aligns with the broader category of privilege escalation through improper access control mechanisms. To mitigate this risk, organizations running affected versions must immediately upgrade Frappe ERPNext to version 15.122.0 or later for the v15 branch, or version 16.50.0 or later for the v16 branch. These updates include patches that enforce proper authorization checks during record creation processes within the Stock module. Until patching is complete, administrators should implement strict network-level access controls to limit exposure of ERPNext instances and review user roles to ensure minimal privilege principles are applied, reducing the potential impact if an account with limited permissions is compromised. Regular security audits focusing on API endpoints that perform data mutations can also help identify similar authorization gaps in other modules before they are exploited.