CVE-2022-40705: Apache SOAP's RPCRouterServlet allows reading of arbitrary files over HTTP

librenms/librenms Updated 02 Oct 2025

Summary

20/11/2022
Yes i
Critical
9.8

CVE-2022-4070: Insufficient Session Expiration in librenms/librenms. Affects librenms/librenms versions < 22.10.0. Fixed in 22.10.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Apache SOAP is an open-source Java implementation of the Simple Object Access Protocol (SOAP). It provides a framework for building web services using XML-based messaging. The RPCRouterServlet is a component of Apache SOAP that handles remote procedure calls (RPC) over HTTP. It allows clients to invoke methods on server-side objects remotely. However, a vulnerability in the RPCRouterServlet allows an attacker to read arbitrary files over HTTP, leading to potential unauthorized access to sensitive information.

Vulnerability Detail

The vulnerability, identified as CVE-2022-40705, is an Improper Restriction of XML External Entity Reference (XXE) vulnerability. By exploiting this flaw, an attacker can craft a malicious XML payload that includes external entity references pointing to arbitrary files on the server. When the RPCRouterServlet processes this payload, it resolves the external entities and includes the contents of the referenced files in the response. This allows the attacker to read sensitive files, such as configuration files or user data, that should not be accessible over HTTP. The vulnerability affects Apache SOAP version 2.2 and later versions. It is unknown whether previous versions are also affected. The Common Vulnerability Scoring System (CVSS) score for this vulnerability is 7.5, indicating a high severity level.

How To Fix

Minimum fixed version

22.10.0

This is the first release that contains the fix.

composer require librenms/librenms:22.10.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a workaround, it is possible to modify the server configuration to block access to the RPCRouterServlet or restrict access to specific IP addresses. This can be achieved by configuring the web server or application server hosting Apache SOAP to deny requests to the RPCRouterServlet URL or by using firewall rules to block incoming connections to the server from unauthorized sources. However, this workaround may impact the functionality of legitimate clients that rely on the RPCRouterServlet for remote procedure calls.

Conclusion

In conclusion, CVE-2022-40705 is a high-severity vulnerability in Apache SOAP's RPCRouterServlet that allows an attacker to read arbitrary files over HTTP. It is crucial to upgrade to a supported version of Apache SOAP or consider alternative SOAP implementations to mitigate this vulnerability. Additionally, server configurations should be reviewed and updated to restrict access to sensitive files and directories. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for librenms/librenms →

Share this vulnerability

FAQ

Apache SOAP is an open-source Java implementation of the Simple Object Access Protocol (SOAP), which provides a framework for building web services using XML-based messaging.

The RPCRouterServlet is a component of Apache SOAP that handles remote procedure calls (RPC) over HTTP. It allows clients to invoke methods on server-side objects remotely.

An XML External Entity (XXE) vulnerability is a type of security flaw that allows an attacker to include external entities in XML documents, which can lead to various attacks, including reading arbitrary files on the server.

An attacker can exploit this vulnerability by crafting a malicious XML payload that includes external entity references pointing to arbitrary files on the server. When the RPCRouterServlet processes this payload, it resolves the external entities and includes the contents of the referenced files in the response, allowing the attacker to read sensitive information.

The vulnerability allows an attacker to read arbitrary files over HTTP, potentially leading to unauthorized access to sensitive information stored on the server. This can include configuration files, user data, or any other files that should not be accessible over the network.

Related vulnerabilities

Recent vulnerabilities recorded for librenms/librenms.

How To Fix

Minimum fixed version

22.10.0

This is the first release that contains the fix.

composer require librenms/librenms:22.10.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback