CVE-2022-40082 Hertz contains path traversal via normalizePath function
Attackers can exploit a path traversal flaw in the Hertz Go web framework to read arbitrary files from the server.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-40082?
CVE-2022-40082 is a high-severity path traversal vulnerability in n/a, published on 28 Sep 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Hertz v0.3.0 ws discovered to contain a path traversal vulnerability via the normalizePath function.
Weakness: CWE-22
Which versions are affected by CVE-2022-40082?
3 open source packages ship an affected version, including github.com/cloudwego/hertz. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/cloudwego/hertz Go | All versions | 0.3.1 |
github.com/cloudwego/hertz Go | All versions | 0.3.1 |
github.com/cloudwego/hertz Go | All versions | 0.3.1 |
Products include Cloudwego Hertz.
How do I fix CVE-2022-40082?
Upgrade github.com/cloudwego/hertz to 0.3.1 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2022-40082 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-40082 exists.
Sources
Also known as GHSA-c9qr-f6c8-rgxf, GO-2022-1027.