# CVE-2021-47935: Sentry 8.2.0 Remote Code Execution via Pickle Deserialization

> Authenticated superusers can execute arbitrary code by injecting malicious pickle payloads into the audit log data parameter.

- **Severity:** High 8.7 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA: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:** 10 May 2026
- **Updated:** 8 Oct 2026
- **Also known as:** GHSA-444r-2whx-3685, PYSEC-2026-131

## What is CVE-2021-47935?

CVE-2021-47935 is a high-severity unsafe deserialization vulnerability in Sentry, published on 10 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Sentry 8.2.0 contains a remote code execution vulnerability that allows authenticated superusers to execute arbitrary commands by injecting malicious pickle-serialized objects through the audit log entry data parameter. Attackers can submit crafted POST requests to the admin audit log endpoint with base64-encoded compressed pickle payloads in the data field to achieve code execution with application privileges.

Weakness: CWE-94 (Improper Control of Generation of Code)

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

5 open source packages ship an affected version, including sentry. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `sentry` | PyPI | All versions to 8.2.0 | None |
| `sentry` | PyPI | All versions | 8.1.4 |
| `sentry` | PyPI | All versions | 8.1.4 |
| `sentry` | PyPI | From 8.2.0 | 8.2.2 |
| `sentry` | PyPI | From 8.2.0 | 8.2.2 |

Products: Sentry Sentry.

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

Upgrade sentry to a fixed version for your release line: 8.1.4 or 8.2.2.

## Is CVE-2021-47935 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-47935 exists.

## Other vulnerabilities in Sentry

- [CVE-2026-42354](https://insights.sbomify.com/CVE-2026-42354/): Sentry: Improper authentication on SAML SSO process allows user identity linking (critical 9.1)
- [CVE-2026-27197](https://insights.sbomify.com/CVE-2026-27197/): Sentry: Improper Authentication on SAML SSO process allows user identity linking (critical 9.1)
- [CVE-2023-39349](https://insights.sbomify.com/CVE-2023-39349/): Sentry vulnerable to privilege escalation via ApiTokensEndpoint (high 8.1)
- [CVE-2023-36826](https://insights.sbomify.com/CVE-2023-36826/): Sentry vulnerable to improper authorization on debug and artifact file downloads (high 7.7)
- [CVE-2026-52794](https://insights.sbomify.com/CVE-2026-52794/): Sentry: Inefficient Regular Expression Complexity in sentry (high 7.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2021-47935 is a high-severity unsafe deserialization vulnerability in Sentry, published on 10 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-47935 exists.

Affected packages and fixed versions:
- sentry (PyPI): affected all versions up to 8.2.0; no fix listed
- sentry (PyPI): affected all versions; fixed in 8.1.4
- sentry (PyPI): affected all versions; fixed in 8.1.4
- sentry (PyPI): affected from 8.2.0; fixed in 8.2.2
- sentry (PyPI): affected from 8.2.0; fixed in 8.2.2

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

## Sources

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

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