Vulnerability MediumRUSTSEC-2025-0022 · openssl
RUSTSEC-2025-0022: Use-After-Free in `Md::fetch` and `Cipher::fetch`
Short answerA security vulnerability in the openssl crate: Use-After-Free in `Md::fetch` and `Cipher::fetch`. GitHub rates it Medium. Fixed in 0.10.72: update to a fixed version.
| Crate | openssl |
|---|---|
| Type | Vulnerability (memory-corruption) |
| Affected versions | From 0.10.39 before 0.10.72. |
| Fixed in | 0.10.72 |
| Severity | Medium (GitHub rating) |
| Published | 2025-04-04 |
| Last changed | 2025-10-28 |
| Also known as | GHSA-4fcv-w3qc-ppgg |
| Affected functions | openssl::cipher::Cipher::fetch, openssl::md::Md::fetch |
What to do
- See which version you have:
cargo tree -i openssl(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p openssl. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for exampleopenssl = "0.10.72") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
When a Some(...) value was passed to the properties argument of either of these functions, a use-after-free would result.
In practice this would nearly always result in OpenSSL treating the properties as an empty string (due to CString::drop's behavior).
The maintainers thank quitbug for reporting this vulnerability to us.
References
- Package: crates.io/crates/openssl
- Advisory: rustsec.org/advisories/RUSTSEC-2025-0022.html
- Web: github.com/sfackler/rust-openssl/pull/2390
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Other advisories for openssl
- Vulnerability HighRUSTSEC-2016-0001 · 2016-11-05SSL/TLS MitM vulnerability due to insecure defaults
- Vulnerability CriticalRUSTSEC-2018-0010 · 2018-06-01Use after free in CMS Signing
- VulnerabilityRUSTSEC-2023-0022 · 2023-03-24`openssl` `X509NameBuilder::build` returned object is not thread safe
- VulnerabilityRUSTSEC-2023-0023 · 2023-03-24`openssl` `SubjectAlternativeName` and `ExtendedKeyUsage::other` allow arbitrary file read
- VulnerabilityRUSTSEC-2023-0024 · 2023-03-24`openssl` `X509Extension::new` and `X509Extension::new_nid` null pointer dereference
- VulnerabilityRUSTSEC-2023-0044 · 2023-06-20`openssl` `X509VerifyParamRef::set_host` buffer over-read
- UnsoundRUSTSEC-2023-0072 · 2023-11-23`openssl` `X509StoreRef::objects` is unsound
- VulnerabilityRUSTSEC-2024-0357 · 2024-07-21`MemBio::get_buf` has undefined behavior with empty buffers
Up next
Same crateopenssl: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?