# CVE-2021-4286: cocagne pysrp _ctsrp.py calculate_x information exposure

> An attacker can exploit information exposure in the calculate_x function of the pysrp library to potentially leak sensitive data.

- **Severity:** Low 2.6 (`CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Dec 2022
- **Updated:** 11 Apr 2025
- **Also known as:** GHSA-xmc3-9m9j-w9x4, PYSEC-2022-43014, UBUNTU-CVE-2021-4286

## What is CVE-2021-4286?

CVE-2021-4286 is a low-severity vulnerability in cocagne pysrp, published on 27 Dec 2022. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

A vulnerability, which was classified as problematic, has been found in cocagne pysrp up to 1.0.16. This issue affects the function calculate_x of the file srp/_ctsrp.py. The manipulation leads to information exposure through discrepancy. Upgrading to version 1.0.17 is able to address this issue. The name of the patch is dba52642f5e95d3da7af1780561213ee6053195f. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-216875.

Weakness: CWE-203 (Observable Discrepancy)

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

3 open source packages ship an affected version, including srp. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `srp` | PyPI | All versions | 1.0.17 |
| `srp` | PyPI | All versions | 1.0.17 |
| `srp` | PyPI | All versions | 1.0.17 |

Products: Pysrp Project Pysrp.

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

Upgrade srp to 1.0.17 or later.

## Is CVE-2021-4286 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2021-4286 is a low-severity vulnerability in cocagne pysrp, published on 27 Dec 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-4286 in the wild and no public exploit code.

Affected packages and fixed versions:
- srp (PyPI): affected all versions; fixed in 1.0.17
- srp (PyPI): affected all versions; fixed in 1.0.17
- srp (PyPI): affected all versions; fixed in 1.0.17

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

## Sources

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

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