CVE-2021-41130
X-Endpoint-API-UserInfo can be spoofed in cloudendpoints Extensible Service Proxy
Check your servers for CVE-2021-41130
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-41130 affects esp, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
Extensible Service Proxy, a.k.a. ESP is a proxy which enables API management capabilities for JSON/REST or gRPC API services. ESPv1 can be configured to authenticate a JWT token. Its verified JWT claim is passed to the application by HTTP header "X-Endpoint-API-UserInfo", the application can use it to do authorization. But if there are two "X-Endpoint-API-UserInfo" headers from the client, ESPv1 only replaces the first one, the 2nd one will be passed to the application. An attacker can send two "X-Endpoint-API-UserInfo" headers, the second one with a fake JWT claim. Application may use the fake JWT claim to do the authorization. This impacts following ESPv1 usages: 1) Users have configured ESPv1 to do JWT authentication with Google ID Token as described in the referenced google endpoint document. 2) Users backend application is using the info in the "X-Endpoint-API-UserInfo" header to do the authorization. It has been fixed by v1.58.0. You need to patch it in the following ways: * If your docker image is using tag ":1", needs to re-start the container to pick up the new version. The tag ":1" will automatically point to the latest version. * If your docker image tag pings to a specific minor version, e.g. ":1.57". You need to update it to ":1.58" and re-start the container. There are no workaround for this issue.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- changed: the damage reaches other components, such as the host of a container or other users
- Impact
- confidentiality low, integrity low, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.39%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 34.9% of all scored CVEs. Scores of 2 Dec 2026.
Weakness
- CWE-290 Authentication Bypass by Spoofing
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| esp |
affected < 1.58.0
|
Is my server affected?
Find the installed version of esp and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i esp
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2021-41130 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2021-41130RHEL, Rocky, Alma, Fedora
rpm -q esp
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2021-41130Alpine
apk list --installed | grep -i espWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2021-41130
trivy image --scanners vuln IMAGE | grep CVE-2021-41130
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
Other references
- https://github.com/cloudendpoints/esp/commit/e310c4f91d229a072507f80c73811489b4cdff27 github.com
- https://cloud.google.com/endpoints/docs/openapi/authenticating-users-google-id cloud.google.com
- https://github.com/cloudendpoints/esp/releases/tag/v1.58.0 github.com
Source: the record CVE-2021-41130 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse