This project might be open to known security vulnerabilities, which can be prevented by tightening the version range of affected dependencies. Find detailed information at the bottom.

Crate opaque-ke

Dependencies

(15 total, 3 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 argon2^0.50.5.3up to date
 curve25519-dalek ⚠️^44.1.3maybe insecure
 derive-where^11.6.0up to date
 digest^0.100.10.7up to date
 displaydoc^0.20.2.5up to date
 elliptic-curve^0.130.13.8up to date
 generic-array^0.141.3.4out of date
 getrandom^0.20.3.4out of date
 hkdf^0.120.12.4up to date
 hmac^0.120.12.1up to date
 rand^0.80.9.2out of date
 serde^11.0.228up to date
 subtle^2.62.6.1up to date
 voprf^0.50.5.0up to date
 zeroize^1.81.8.2up to date

Dev dependencies

(13 total, 4 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 bincode^12.0.1out of date
 chacha20poly1305^0.100.10.1up to date
 criterion^0.50.7.0out of date
 hex^0.40.4.3up to date
 p256^0.130.13.2up to date
 p384^0.130.13.1up to date
 p521^0.13.30.13.3up to date
 proptest^11.8.0up to date
 rand^0.80.9.2out of date
 regex ⚠️^11.12.2maybe insecure
 rustyline^1417.0.2out of date
 scrypt^0.110.11.0up to date
 serde_json^11.0.145up to date

Security Vulnerabilities

regex: Regexes with large repetitions on empty sub-expressions take a very long time to parse

RUSTSEC-2022-0013

The Rust Security Response WG was notified that the regex crate did not properly limit the complexity of the regular expressions (regex) it parses. An attacker could use this security issue to perform a denial of service, by sending a specially crafted regex to a service accepting untrusted regexes. No known vulnerability is present when parsing untrusted input with trusted regexes.

This issue has been assigned CVE-2022-24713. The severity of this vulnerability is "high" when the regex crate is used to parse untrusted regexes. Other uses of the regex crate are not affected by this vulnerability.

Overview

The regex crate features built-in mitigations to prevent denial of service attacks caused by untrusted regexes, or untrusted input matched by trusted regexes. Those (tunable) mitigations already provide sane defaults to prevent attacks. This guarantee is documented and it's considered part of the crate's API.

Unfortunately a bug was discovered in the mitigations designed to prevent untrusted regexes to take an arbitrary amount of time during parsing, and it's possible to craft regexes that bypass such mitigations. This makes it possible to perform denial of service attacks by sending specially crafted regexes to services accepting user-controlled, untrusted regexes.

Affected versions

All versions of the regex crate before or equal to 1.5.4 are affected by this issue. The fix is include starting from regex 1.5.5.

Mitigations

We recommend everyone accepting user-controlled regexes to upgrade immediately to the latest version of the regex crate.

Unfortunately there is no fixed set of problematic regexes, as there are practically infinite regexes that could be crafted to exploit this vulnerability. Because of this, we do not recommend denying known problematic regexes.

Acknowledgements

We want to thank Addison Crump for responsibly disclosing this to us according to the Rust security policy, and for helping review the fix.

We also want to thank Andrew Gallant for developing the fix, and Pietro Albini for coordinating the disclosure and writing this advisory.

curve25519-dalek: Timing variability in `curve25519-dalek`'s `Scalar29::sub`/`Scalar52::sub`

RUSTSEC-2024-0344

Timing variability of any kind is problematic when working with potentially secret values such as elliptic curve scalars, and such issues can potentially leak private keys and other secrets. Such a problem was recently discovered in curve25519-dalek.

The Scalar29::sub (32-bit) and Scalar52::sub (64-bit) functions contained usage of a mask value inside a loop where LLVM saw an opportunity to insert a branch instruction (jns on x86) to conditionally bypass this code section when the mask value is set to zero as can be seen in godbolt:

A similar problem was recently discovered in the Kyber reference implementation:

https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/hqbtIGFKIpU/m/cnE3pbueBgAJ

As discussed on that thread, one portable solution, which is also used in this PR, is to introduce a volatile read as an optimization barrier, which prevents the compiler from optimizing it away.

The fix can be validated in godbolt here:

The problem was discovered and the solution independently verified by Alexander Wagner [email protected] and Lea Themint [email protected] using their DATA tool:

https://github.com/Fraunhofer-AISEC/DATA