CVE-2021-32769: Path Traversal Vulnerability in io.micronaut:micronaut-http-server-netty
Summary
CVE-2021-32769: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in micronaut-core. Affects io.micronaut:micronaut-http-server-netty versions < 2.5.9. Fixed in 2.5.9. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The io.micronaut:micronaut-http-server-netty package is a part of the Micronaut framework and provides an HTTP server implementation based on the Netty library. It allows developers to build scalable and high-performance web applications. However, a vulnerability has been identified in the package that could potentially lead to path traversal attacks.
Vulnerability Detail
The vulnerability, known as Path Traversal, arises due to improper limitation of a pathname to a restricted directory. In the affected version of the package, Micronaut does not adequately restrict file access to configured paths. This allows an attacker to access any file from the filesystem by using "/../" in the URL. By exploiting this vulnerability, an attacker can potentially access sensitive information stored on the server.
How To Fix
Latest published version: 5.2.18 as of 22 Oct 2026
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2.5.9
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If updating the package is not immediately feasible, a temporary workaround is to modify the configuration to use a single asterisk (*) instead of double asterisks (**) in the mapping. This restricts the exposure to a flat structure of the directory, preventing path traversal. For example:
router:
static-resources:
assets:
enabled: true
mapping: /.assets/public/*
paths: file:/home/lstrmiska/test/
Alternatively, running Micronaut in a chroot environment (available on Linux) can also mitigate the vulnerability.
Conclusion
The Path Traversal vulnerability in the io.micronaut:micronaut-http-server-netty package can potentially lead to unauthorized access to sensitive files on the server's filesystem. It is crucial to update the package to the latest version or apply the provided workaround to mitigate the risk. If you have any further questions or need assistance with vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for io.micronaut:micronaut-http-server-netty →
FAQ
The vulnerability allows an attacker to access arbitrary files on the server's filesystem, potentially leading to the exposure of sensitive information.
You can use Vulert's playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities without requiring access to the code or installation.
At the time of this report, there are no known public exploits for this vulnerability. However, it is important to promptly apply the recommended fix to mitigate the risk.
In addition to updating the package or applying the workaround, it is recommended to follow secure coding practices, such as input validation and sanitization, to prevent path traversal attacks.
For more information, you can refer to the Common Weakness Enumeration (CWE) entry for Path Traversal (CWE-22) at https://cwe.mitre.org/data/definitions/22.html.