# CVE-2023-49092: RustCrypto/RSA vulnerable to a Marvin Attack via key recovery through timing sidechannels

> Attackers can recover private RSA keys by observing timing side channels in the RustCrypto RSA library, compromising encrypted data and authentication.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Nov 2023
- **Updated:** 27 Nov 2024
- **Also known as:** DEBIAN-CVE-2023-49092, GHSA-4grx-2x9w-596c, GHSA-c38w-74pg-36hr, MINI-2pc2-jgvp-2r86, MINI-hpx4-jmxf-w6c5, RUSTSEC-2023-0071, UBUNTU-CVE-2023-49092, openSUSE-SU-2024:13542-1

## What is CVE-2023-49092?

CVE-2023-49092 is a medium-severity vulnerability in RustCrypto RSA, published on 28 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

RustCrypto/RSA is a portable RSA implementation in pure Rust. Due to a non-constant-time implementation, information about the private key is leaked through timing information which is observable over the network. An attacker may be able to use that information to recover the key. There is currently no fix available. As a workaround, avoid using the RSA crate in settings where attackers are able to observe timing information, e.g. local use on a non-compromised computer.

Weakness: CWE-203 (Observable Discrepancy), CWE-385 (Covert Timing Channel)

## Which versions are affected by CVE-2023-49092?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rsa` | crates.io | All versions to 0.9.6 | None |
| `rsa` | crates.io | All versions to 0.9.6 | None |
| `rsa` | crates.io | All versions to 0.9.6 | None |
| `rsa` | crates.io | All versions to 0.9.6 | None |
| `rsa` | crates.io | From 0.0.0-0 | None |
| `cargo-audit-advisory-db` | openSUSE:Tumbleweed | All versions | 20231219-1.1 |

Products: Rustcrypto Rsa.

## How do I fix CVE-2023-49092?

No fix published yet.

## Is CVE-2023-49092 being exploited?

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

## Other vulnerabilities in RustCrypto RSA

- [CVE-2026-21895](https://insights.sbomify.com/CVE-2026-21895/): rsa crate has potential panic on a prime being equal to 1 (low 2.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-49092 and fix it if it is affected.

What it is: CVE-2023-49092 is a medium-severity vulnerability in RustCrypto RSA, published on 28 Nov 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-49092 in the wild and no public exploit code.

Affected packages and fixed versions:
- rsa (crates.io): affected all versions up to 0.9.6; no fix listed
- rsa (crates.io): affected all versions up to 0.9.6; no fix listed
- rsa (crates.io): affected all versions up to 0.9.6; no fix listed
- rsa (crates.io): affected all versions up to 0.9.6; no fix listed
- rsa (crates.io): affected from 0.0.0-0; no fix listed

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

## Sources

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

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