Email me

Rust advisories / openssl-src

Vulnerability HighRUSTSEC-2021-0129 · openssl-src

RUSTSEC-2021-0129: Invalid handling of `X509_verify_cert()` internal errors in libssl

Short answerA security vulnerability in the openssl-src crate: Invalid handling of `X509_verify_cert()` internal errors in libssl. GitHub rates it High. Fixed in 300.0.4: update to a fixed version.

Crateopenssl-src
TypeVulnerability (denial-of-service)
Affected versionsFrom 300.0.0 before 300.0.4.
Fixed in300.0.4
SeverityHigh (GitHub rating)
Published2021-12-14
Last changed2024-12-16
Also known asBIT-node-2021-4044, BIT-node-min-2021-4044, CVE-2021-4044, GHSA-mmjf-f5jw-w72q

What to do

  1. See which version you have: cargo tree -i openssl-src (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p openssl-src. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example openssl-src = "300.0.4") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

Internally libssl in OpenSSL calls X509_verify_cert() on the client side to verify a certificate supplied by a server. That function may return a negative return value to indicate an internal error (for example out of memory). Such a negative return value is mishandled by OpenSSL and will cause an IO function (such as SSL_connect() or SSL_do_handshake()) to not indicate success and a subsequent call to SSL_get_error() to return the value SSL_ERROR_WANT_RETRY_VERIFY. This return value is only supposed to be returned by OpenSSL if the application has previously called SSL_CTX_set_cert_verify_callback(). Since most applications do not do this the SSL_ERROR_WANT_RETRY_VERIFY return value from SSL_get_error() will be totally unexpected and applications may not behave correctly as a result. The exact behaviour will depend on the application but it could result in crashes, infinite loops or other similar incorrect responses.

This issue is made more serious in combination with a separate bug in OpenSSL 3.0 that will cause X509_verify_cert() to indicate an internal error when processing a certificate chain. This will occur where a certificate does not include the Subject Alternative Name extension but where a Certificate Authority has enforced name constraints. This issue can occur even with valid chains.

References

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-src

Full security history of openssl-src

Up next

Same crateopenssl-src: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ