CVE-2026-61744: InvenTree: Barcode-scan API (`POST /api/barcode/`) returns full serialized object data without enforcing the model's view role
InvenTree is an Open Source Inventory Management System. Prior to 1.4.0, POST /api/barcode/ accepts an attacker-synthesized internal JSON barcode containing a lowercase model label and integer primary key, while BarcodeView uses IsAuthenticatedOrReadScope and requires only authentication or a general read scope. The built-in barcode plugin selects the object with model.objects.get(pk=...), and InvenTreeBarcodeMixin.formatmatchedresponse() returns the complete model serializer output as instance without checking the caller's per-model view role. A low-privilege user can enumerate primary keys for parts, stock, locations, supplier and manufacturer parts, orders, and builds to disclose commercially sensitive inventory, pricing, supplier, customer, and order data. This issue is fixed in version 1.4.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
InvenTreeto a version that resolves this vulnerability.Fixed in 1.4.0 - Compensating control
Restrict access to the InvenTree Barcode-scan API endpoint (POST /api/barcode/) so that only authenticated users with appropriate per-model read/view permissions can reach it, until all instances are upgraded to 1.4.0.
Event History
Frequently Asked Questions
Which deployments are exposed?
InvenTree deployments running versions prior to 1.4.0 are affected. Exploitation targets the POST /api/barcode/ endpoint and can expose data from parts, stock, locations, supplier and manufacturer parts, orders, and builds.
What access does an attacker need?
An attacker needs authentication or a general read scope; no per-model view role is required. They can submit a synthesized internal JSON barcode containing a lowercase model label and an integer primary key.
What information can be disclosed?
The endpoint can return complete serialized object data for records the caller is not authorized to view. Disclosed information may include commercially sensitive inventory, pricing, supplier, customer, and order data.
How can I determine whether exploitation may have occurred?
Review requests to POST /api/barcode/ for synthesized internal JSON barcode payloads containing model labels and integer primary keys, especially repeated requests across sequential primary keys. Such activity may indicate enumeration of restricted objects.
What is the remediation?
Upgrade InvenTree to version 1.4.0, which fixes the missing per-model view-role enforcement in barcode responses.