# CVE-2020-15125: Authorization header is not sanitized in an error object in auth0

> Attackers can obtain bearer tokens from logs if the auth0 npm library is used in specific machine-to-machine configurations.

- **Severity:** High 7.7 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 29 Jul 2020
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-5jpf-pj32-xx53

## What is CVE-2020-15125?

CVE-2020-15125 is a high-severity vulnerability in node-auth0, published on 29 Jul 2020. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

In auth0 (npm package) versions before 2.27.1, a DenyList of specific keys that should be sanitized from the request object contained in the error object is used. The key for Authorization header is not sanitized and in certain cases the Authorization header value can be logged exposing a bearer token. You are affected by this vulnerability if you are using the auth0 npm package, and you are using a Machine to Machine application authorized to use Auth0's management API

Weakness: CWE-209 (Generation of Error Message Containing Sensitive Information)

## Which versions are affected by CVE-2020-15125?

2 open source packages ship an affected version, including auth0. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `auth0` | npm | All versions | 2.27.1 |
| `auth0` | npm | All versions | 2.27.1 |

Products: Auth0 Auth0.js.

## How do I fix CVE-2020-15125?

Upgrade auth0 to 2.27.1 or later.

## Is CVE-2020-15125 being exploited?

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

## Other vulnerabilities in node-auth0

- [CVE-2018-6873](https://insights.sbomify.com/CVE-2018-6873/): Auth bypass in n/a (critical 9.8)
- [CVE-2018-6874](https://insights.sbomify.com/CVE-2018-6874/): Cross-Site Request Forgery (CSRF) in Auth0 (high 8.8)
- [CVE-2018-7307](https://insights.sbomify.com/CVE-2018-7307/): Auth0-js bypasses CSRF checks (high 8.8)
- [CVE-2017-17068](https://insights.sbomify.com/CVE-2017-17068/): auth0-js Privilege Escalation Vulnerability (high 7.5)
- [CVE-2026-42280](https://insights.sbomify.com/CVE-2026-42280/): Improper Permission Checking in Auth.js SDK (high 7.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-15125 and fix it if it is affected.

What it is: CVE-2020-15125 is a high-severity vulnerability in node-auth0, published on 29 Jul 2020. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-15125 in the wild and no public exploit code.

Affected packages and fixed versions:
- auth0 (npm): affected all versions; fixed in 2.27.1
- auth0 (npm): affected all versions; fixed in 2.27.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-15125/ (Markdown: https://insights.sbomify.com/CVE-2020-15125/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-15125
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-15125
- OSV: https://osv.dev/vulnerability/CVE-2020-15125

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-15125/
Summaries are generated and may contain mistakes; the official description above is the record.
