Skip to content

API bypasses MFA Requirements

High
SchrodingersGat published GHSA-2crp-q9pc-457j May 24, 2024

Package

InvenTree

Affected versions

< 0.15.2

Patched versions

0.14.6, 0.15.2, 0.16.0

Description

Impact

When logging in via the API (which includes the new React user interface), any MFA (multi factor authentications) requirements are bypassed, allowing the user to login without providing additional credentialas.

MFA Requirements

InvenTree provides support for multi-factor authentication with 2FA / TOTP integration. This can be enforced on a single user basis (if the user configures MFA) or enforced for all users (via a global configuration option). If either user or global MFA is configured, then the user should not be able to login without providing their MFA credentials.

API Login Endpoint

The /api/auth/login/ endpoint does not observe these requirements, and allows users to login (and create a new authenticated session), without providing the required authentication tokens.

React (PUI) Interface

The new React interface - also known as the Platform User Interface (PUI) - uses the /api/auth/login/ endpoint to log the user in. Users can login using only a valid username / password combination - even if MFA is configured.

Fix

The /api/auth/login/ endpoint will be immediately patched to prevent login for users who have MFA configured. This will temporarily mean that the PUI interface cannot be used if users have MFA configured, until a more comprehensive solution is developed.

Patches

Security patches will be applied to the following releases:

  • 0.16.0 - Upcoming release candidate
  • 0.15.2 - Patch will be backported to the 0.15.x branch
  • 0.14.6 - Patch will be backported to the 0.14.x branch

Workarounds

None

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L

CVE ID

No known CVE

Weaknesses

No CWEs

Credits