Overview
The CVE-2025-54138 vulnerability is a high-risk security flaw found in LibreNMS versions 25.6.0 and below. This vulnerability could potentially allow remote code execution (RCE) if an attacker is able to manipulate the application’s file inclusion functionality. This presents a significant risk to organizations using affected versions of LibreNMS, potentially leading to system compromises and data breaches.
Vulnerability Summary
CVE ID: CVE-2025-54138
Severity: High (CVSS: 7.5)
Attack Vector: Network
Privileges Required: None
User Interaction: None
Impact: Potential system compromise and data leakage
Affected Products
Escape the Surveillance Era
Most apps won’t tell you the truth.
They’re part of the problem.
Phone numbers. Emails. Profiles. Logs.
It’s all fuel for surveillance.
Ameeba Chat gives you a way out.
- • No phone number
- • No email
- • No personal info
- • Anonymous aliases
- • End-to-end encrypted
Chat without a trace.
Product | Affected Versions
LibreNMS | 25.6.0 and below
How the Exploit Works
The exploit takes advantage of a flaw in the ajax_form.php endpoint of LibreNMS, which allows for Remote File Inclusion. The application directly uses the type parameter to dynamically include .inc.php files from a trusted path without validation, which potentially allows an attacker to execute arbitrary code if they can stage a file in the include path.
Conceptual Example Code
This is a conceptual example of how an attacker might exploit the vulnerability:
POST /ajax_form.php HTTP/1.1
Host: target.example.com
Content-Type: application/x-www-form-urlencoded
type=../../../malicious_file.inc.php
In this example, the attacker is attempting to include a malicious PHP file from outside the trusted path, which could lead to remote code execution if successful.
Mitigation
Users are advised to upgrade to LibreNMS version 25.7.0 or later, which includes a fix for this vulnerability. As a temporary measure, users can also use a web application firewall (WAF) or intrusion detection system (IDS) to block attempts to exploit this vulnerability.

