/

CVE-2026-35476

Severity:

HIGH RISK

(7.2)

Improper Authorization / Access Control in InvenTree

CVE-2026-35476

Analyzed

Vulnerability type

Category:

Improper Authorization / Access Control

CWE:

CWE-285

Impact:

Privilege Escalation to Staff Role

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

InvenTree's user account API endpoint allowed any authenticated non-staff user to promote themselves to staff by issuing a crafted POST request to their own user account resource.

Because write permissions on the endpoint were misconfigured, privilege checks did not prevent changes to the is_staff-like attribute, enabling unauthorized elevation to staff-level capabilities.

Affected context

The vulnerability occurs in InvenTree deployments where:

  • The REST API is enabled and exposed to authenticated users
  • Non-staff users can access their own user account endpoint
  • The API view or serializer permits write access to staff-related fields without enforcing role-based checks on who may modify them

In such environments, any logged-in user able to send POST or update requests to their own account endpoint could attempt to toggle privileged flags on their profile.

Exploit preconditions

  • Attack surface: InvenTree HTTP API (user account endpoint)
  • Required access: Valid, non-staff authenticated account on the InvenTree instance
  • Trigger point: A POST or update request sent to the user's own account endpoint with staff-related fields set to privileged values
  • Why exploitation is possible: The access control configuration on the endpoint incorrectly trusts any authenticated user to modify sensitive authorization attributes, instead of restricting those fields to already-privileged roles or server-side logic.

Why this happens

The root cause is an authorization policy failure in the user management API, mapped to CWE-285: Improper Authorization.

Sensitive fields that control staff or admin status are treated as regular writable attributes and are not properly shielded behind role checks or server-enforced rules.

At an abstract level, the system assumes that "ownership" of a resource (a user editing their own profile) is sufficient to allow modification of authorization-related properties, rather than separating profile data (e.g., name, email) from privileges (e.g., staff flags) and enforcing distinct access rules.

Potential impact

  • Non-staff users may elevate their privileges to staff-level within the application.
  • Attackers can gain access to staff-only views, administrative panels, or configuration features.
  • Unauthorized modification or deletion of inventory, records, or system settings could occur.
  • Broader compromise of business workflows and data integrity through misuse of elevated privileges.
  • Potential pivot into other administrative operations exposed to staff roles.

General mitigation guidance

Effective mitigation focuses on tightening authorization controls around privilege-bearing attributes and endpoints:

  • Segregate user profile fields (e.g., contact details) from authorization fields (e.g., staff/admin flags) and expose only non-sensitive fields for self-service updates.
  • Enforce server-side checks that only designated privileged roles may modify any field that affects authorization, such as staff, admin, permission groups, or roles.
  • Adopt a "deny by default" model for user-modifiable fields, explicitly whitelisting safe attributes instead of implicitly trusting all model fields.
  • Implement role-based access control (RBAC) at the view or controller layer, with clear distinctions between self-service endpoints and administrative endpoints.
  • Log and monitor any changes to authorization-related fields and restrict such operations to controlled workflows (e.g., admin-only screens, approval processes).
  • Minimize the privileges associated with staff roles where possible, following least privilege principles.

How teams detect issues like this

Detection strategies generally involve code-level review and runtime monitoring:

  • Static analysis and code review:
  • Inspect API serializers, controllers, or views that expose user models, verifying that sensitive fields (staff/admin flags, roles, permission groups) are read-only or restricted.
  • Look for patterns where user identity (e.g., "is the user editing their own account?") is used as the sole gate for updating fields that influence authorization.
  • Use static analysis or linting rules that flag writable authorization properties in public endpoints.
  • Configuration and policy checks:
  • Enforce security coding standards that prohibit direct mass-assignment or unrestricted serialization of authorization-related attributes.
  • Implement automated tests asserting that non-privileged roles cannot modify staff/admin fields via the API.
  • Runtime monitoring:
  • Log all changes to privilege-bearing fields and alert on unusual patterns, such as many self-elevations or privilege changes performed outside expected admin workflows.
  • Periodically audit user roles and staff status against expected assignments.

Sources

SourceLink
docs.inventree.orgdocs.inventree.org/en/stable/concepts/threat_model/#assumed-trust
github.comgithub.com/inventree/InvenTree/security/advisories/GHSA-r8q5-3595-3jh2

Frequently asked

questions

Yes, if the InvenTree API is accessible over the network and an attacker can obtain or create a standard user account, they can remotely send crafted requests to elevate their own account to staff level.

The attacker must have valid, authenticated access as a non-staff user. Anonymous users cannot exploit this specific flaw, but any regular account is sufficient if it can reach the user account endpoint.

Separate user profile management from authorization management and treat all privilege-related fields as strictly server-controlled. Only privileged roles (e.g., existing staff or system administrators) should be able to modify staff/admin flags, and those modifications should occur via dedicated, access-controlled endpoints or administrative interfaces.

Adopt robust access control design practices:

  • Define clear RBAC policies and map them to endpoints and fields early in the design.
  • Use allow-lists for updatable attributes on self-service endpoints and make authorization attributes read-only to non-admins.
  • Add automated tests and code review checklists to ensure that changes to user models do not unintentionally expose privilege-bearing fields.
  • Regularly review security-sensitive endpoints for over-permissive field access and update authorization rules as the application evolves.
Find out what's already
exploitable in your codebase.