/

CVE-2026-86426

Severity:

CRITICAL RISK

(9.8)

Authentication Bypass (CWE-287) in LibreNMS REST API

CVE-2026-86426

Analyzed

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Unauthorized API Access and Potential Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

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

A critical authentication bypass in the LibreNMS REST API may allow unauthenticated attackers to access protected endpoints by submitting numeric values where string authentication tokens are expected. Successful exploitation could expose device credentials and administrative functions, including features that may enable remote code execution through alert templates.

Affected context

The vulnerability affects LibreNMS deployments using REST API authentication logic that compares attacker-controlled numeric input with token values through database operations susceptible to MySQL type coercion. Risk is present when protected API endpoints accept these values without enforcing token type, format, and validity checks before authorization decisions.

Exploit preconditions

  • Attack surface: LibreNMS REST API endpoints
  • Required access: No prior authentication may be required
  • Trigger point: Authentication or token validation involving numeric input
  • Why exploitation is possible: Database type coercion may cause small integer values to match token-related data when the application does not enforce strict input types and comparison semantics

Why this happens

The underlying issue is an authentication design flaw in which attacker-controlled input is accepted in a type and format that differs from the expected token representation. When this input reaches database comparisons vulnerable to implicit type coercion, an invalid value may be treated as equivalent to a valid credential. This maps to CWE-287: Improper Authentication, because the application can grant access without reliably verifying the requester's identity.

Potential impact

  • Unauthenticated attackers may access protected API functionality
  • Device credentials and other sensitive operational data could be exposed
  • Administrative actions could be performed without authorization
  • Monitoring configurations and managed devices may be modified
  • Alert-template functionality could potentially be abused for remote code execution
  • The LibreNMS deployment or connected infrastructure could be compromised

General mitigation guidance

Mitigation generally focuses on making authentication checks strict, type-safe, and independent of database coercion behavior.

Common defensive patterns include:

  • Accepting only the expected token type, encoding, length, and character set
  • Rejecting numeric and otherwise malformed authentication values before database access
  • Using parameterized queries with explicit type handling and strict comparisons
  • Separating authentication decisions from loosely typed database expressions
  • Applying least privilege to API identities and administrative functions
  • Restricting alert-template editing and execution capabilities to trusted administrators
  • Limiting API exposure through network policy, gateway controls, and appropriate rate limits

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying weak token validation and implicit type conversions
  • Code review checks for authentication decisions based on loosely typed request parameters
  • Tests that submit wrong-type, empty, boundary, and malformed credential values
  • API gateway or application logs showing repeated unauthenticated requests with numeric token values
  • Policy enforcement requiring strict schemas and centralized authentication middleware
  • Automated security review tools that flag authentication checks dependent on database coercion

Sources

SourceLink
github.comgithub.com/librenms/librenms/security/advisories/GHSA-cvq8-gqfq-3mvg
vulncheck.comvulncheck.com/advisories/librenms-before-26.8.0-authentication-bypass-via-api-token-type-confusion

Frequently asked

questions

It may be remotely exploitable when the LibreNMS REST API is reachable by an attacker and the affected authentication behavior is exposed. Network controls and API access policies influence the practical scope.

The described attack path does not require prior authentication. The key requirement is access to a vulnerable API endpoint.

Enforce strict token type and format validation before authorization, use type-safe database comparisons, and ensure that malformed authentication input is rejected.

Use centralized, strongly typed authentication middleware; test invalid and wrong-type credentials; minimize administrative API privileges; and monitor for anomalous unauthenticated requests.

Find out what's already
exploitable in your codebase.