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 serde-xrpl

Dependencies

(8 total, 2 outdated)

CrateRequiredLatestStatus
 bs58^0.4.00.5.1out of date
 hex^0.4.30.4.3up to date
 hex-literal^0.3.40.4.1out of date
 lazy_static^1.4.01.4.0up to date
 num-traits^0.2.140.2.18up to date
 rust_decimal^1.19.01.35.0up to date
 serde^1.0.1331.0.199up to date
 serde_json^1.0.741.0.116up to date

Crate xrpl-rs

Dependencies

(26 total, 10 outdated, 3 possibly insecure)

CrateRequiredLatestStatus
 tokio ⚠️^11.37.0maybe insecure
 tokio-test^0.4.20.4.4up to date
 serde^1.0.1261.0.199up to date
 serde_json^1.0.641.0.116up to date
 reqwest^0.11.30.12.4out of date
 url^2.2.22.5.0up to date
 websocket ⚠️^0.26.20.27.1out of date
 futures^0.3.150.3.30up to date
 async-trait^0.1.500.1.80up to date
 log^0.4.140.4.21up to date
 lazy_static^1.4.01.4.0up to date
 hex-literal^0.3.40.4.1out of date
 bs58^0.4.00.5.1out of date
 hex^0.4.30.4.3up to date
 rust_decimal^1.19.01.35.0up to date
 serde-xrpl^0.1.20.1.2up to date
 secp256k1^0.21.00.29.0out of date
 sha256^1.0.31.5.0up to date
 sha2^0.10.00.10.8up to date
 ed25519^1.3.02.2.3out of date
 ed25519-dalek ⚠️^1.0.12.1.1out of date
 ripemd^0.1.00.1.3up to date
 simple_logger^2.1.04.3.3out of date
 tokio-tungstenite^0.17.10.21.0out of date
 serde_with^1.12.03.8.1out of date
 rand^0.8.50.8.5up to date

Security Vulnerabilities

websocket: Unbounded memory allocation based on untrusted length

RUSTSEC-2022-0035

Impact

Untrusted websocket connections can cause an out-of-memory (OOM) process abort in a client or a server. The root cause of the issue is during dataframe parsing. Affected versions would allocate a buffer based on the declared dataframe size, which may come from an untrusted source. When Vec::with_capacity fails to allocate, the default Rust allocator will abort the current process, killing all threads. This affects only sync (non-Tokio) implementation. Async version also does not limit memory, but does not use with_capacity, so DoS can happen only when bytes for oversized dataframe or message actually got delivered by the attacker.

This is a security concern for you, if

  • your server application handles untrusted websocket connections
  • OR your client application connects to untrusted websocket servers

Patches

The crashes are fixed in version 0.26.5 by imposing default dataframe size limits. Affected users are advised to update to this version.

Note that default memory limits are rather large (100MB dataframes and 200 MB messages), so they can still cause DoS in some environments (i.e. 32-bit). New API has been added to fine tune those limits for specific applications.

Workarounds

  • Migrate your project to another, maintained Websocket library like Tungstenite.
  • Accept only trusted WebSocket traffic.
  • Filter the WebSocket traffic though some kind of proxy that ensures sanity limits on messages.
  • Handle process aborts gracefully and limit process memory using OS tools.

Credits

This issue was reported by Evan Richter at ForAllSecure and found with Mayhem and Cargo Fuzz.

ed25519-dalek: Double Public Key Signing Function Oracle Attack on `ed25519-dalek`

RUSTSEC-2022-0093

Versions of ed25519-dalek prior to v2.0 model private and public keys as separate types which can be assembled into a Keypair, and also provide APIs for serializing and deserializing 64-byte private/public keypairs.

Such APIs and serializations are inherently unsafe as the public key is one of the inputs used in the deterministic computation of the S part of the signature, but not in the R value. An adversary could somehow use the signing function as an oracle that allows arbitrary public keys as input can obtain two signatures for the same message sharing the same R and only differ on the S part.

Unfortunately, when this happens, one can easily extract the private key.

Revised public APIs in v2.0 of ed25519-dalek do NOT allow a decoupled private/public keypair as signing input, except as part of specially labeled "hazmat" APIs which are clearly labeled as being dangerous if misused.

tokio: reject_remote_clients Configuration corruption

RUSTSEC-2023-0001

On Windows, configuring a named pipe server with pipe_mode will force ServerOptions::reject_remote_clients as false.

This drops any intended explicit configuration for the reject_remote_clients that may have been set as true previously.

The default setting of reject_remote_clients is normally true meaning the default is also overridden as false.

Workarounds

Ensure that pipe_mode is set first after initializing a ServerOptions. For example:

let mut opts = ServerOptions::new();
opts.pipe_mode(PipeMode::Message);
opts.reject_remote_clients(true);