CVE-2021-43557 Path traversal in request_uri variable

High 7.5 Published Updated

Attackers can bypass URI block lists in Apache APISIX by using unnormalized request URIs, potentially accessing restricted internal endpoints.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-43557?

CVE-2021-43557 is a high-severity path traversal vulnerability in Apache APISIX, published on 22 Nov 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The uri-block plugin in Apache APISIX before 2.10.2 uses $request_uri without verification. The $request_uri is the full original request URI without normalization. This makes it possible to construct a URI to bypass the block list on some occasions. For instance, when the block list contains "^/internal/", a URI like `//internal/` can be used to bypass it. Some other plugins also have the same issue. And it may affect the developer's custom plugin.

Weakness: CWE-77

Which versions are affected by CVE-2021-43557?

1 open source package ship an affected version, including apisix. It affects 1 product.

PackageAffectedFixed in
apisix BitnamiAll versions2.10.2

Products include Apache Apisix.

How do I fix CVE-2021-43557?

Upgrade apisix to 2.10.2 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2021-43557 being exploited?

There is no known exploitation of CVE-2021-43557 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as BIT-apisix-2021-43557, GHSA-9wxc-375c-cvq2.

Is CVE-2021-43557 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free