# CVE-2021-28131: Impala logs contain secrets

> Authenticated attackers can hijack sessions by reading secrets from logs, enabling privilege escalation and bypassing authorization controls in Impala deployments.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 22 Jul 2021
- **Updated:** 3 Aug 2024
- **Also known as:** GHSA-h765-v877-jmq3

## What is CVE-2021-28131?

CVE-2021-28131 is a high-severity vulnerability in Apache Impala, published on 22 Jul 2021. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Impala sessions use a 16 byte secret to verify that the session is not being hijacked by another user. However, these secrets appear in the Impala logs, therefore Impala users with access to the logs can use another authenticated user's sessions with specially constructed requests. This means the attacker is able to execute statements for which they don't have the necessary privileges otherwise. Impala deployments with Apache Sentry or Apache Ranger authorization enabled may be vulnerable to privilege escalation if an authenticated attacker is able to hijack a session or query from another authenticated user with privileges not assigned to the attacker. Impala deployments with audit logging enabled may be vulnerable to incorrect audit logging as a user could undertake actions that were logged under the name of a different authenticated user. Constructing an attack requires a high degree of technical sophistication and access to the Impala system as an authenticated user. Mitigation: If an Impala deployment uses Apache Sentry, Apache Ranger or audit logging, then users should upgrade to a version of Impala with the fix for IMPALA-10600. The Impala 4.0 release includes this fix. This hides session secrets from the logs to eliminate the risk of any attack using this mechanism. In lieu of an upgrade, restricting access to logs that expose secrets will reduce the risk of an attack. Restricting access to the Impala deployment to trusted users will also reduce the risk of an attack. Log redaction techniques can be used to redact secrets from the logs.

Weakness: CWE-532 (Insertion of Sensitive Information into Log File), CWE-288 (Authentication Bypass Using an Alternate Path or Channel)

## Which versions are affected by CVE-2021-28131?

It affects 1 product.


Products: Apache Impala.

## How do I fix CVE-2021-28131?

No fix has been published for CVE-2021-28131 yet. Limit exposure of the affected software until one is available.

## Is CVE-2021-28131 being exploited?

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

## Other vulnerabilities in Apache Impala

- [CVE-2026-56207](https://insights.sbomify.com/CVE-2026-56207/): Apache Impala: SAML authentication bypass via forged bearer token (critical 9.8)
- [CVE-2018-11792](https://insights.sbomify.com/CVE-2018-11792/): Privilege escalation in Apache Impala (critical 9.8)
- [CVE-2017-5640](https://insights.sbomify.com/CVE-2017-5640/): Auth bypass in Apache Impala (critical 9.8)
- [CVE-2026-57866](https://insights.sbomify.com/CVE-2026-57866/): Apache Impala: Secrets Exfiltration via SSRF (high 8.8)
- [CVE-2026-65181](https://insights.sbomify.com/CVE-2026-65181/): Apache Impala: RCE via External Data Source Class Loading (high 8.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-28131 and fix it if it is affected.

What it is: CVE-2021-28131 is a high-severity vulnerability in Apache Impala, published on 22 Jul 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-28131 in the wild and no public exploit code.

Affected product: Apache Impala. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-2021-28131/ (Markdown: https://insights.sbomify.com/CVE-2021-28131/index.md)
```

## Sources

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

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