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 forest-filecoin

Dependencies

(157 total, 5 outdated, 8 possibly insecure)

CrateRequiredLatestStatus
 anes^0.20.2.1up to date
 argon2^0.50.5.3up to date
 async-compression^0.40.4.41up to date
 async-fs^22.2.0up to date
 async-trait^0.10.1.89up to date
 asynchronous-codec^0.70.7.0up to date
 axum^0.80.8.8up to date
 backon^11.6.0up to date
 base64^0.220.22.1up to date
 bigdecimal^0.40.4.10up to date
 blake2b_simd^11.0.4up to date
 bls-signatures^0.150.15.0up to date
 blstrs^0.70.7.1up to date
 byteorder^11.5.0up to date
 bytes ⚠️^11.11.1maybe insecure
 cbor4ii^0.21.2.2out of date
 cfg-if^11.0.4up to date
 cfg-vis^0.30.3.0up to date
 chrono ⚠️^0.40.4.44maybe insecure
 clap^44.5.60up to date
 clap_complete^44.5.66up to date
 colored^33.1.1up to date
 criterion^0.80.8.2up to date
 crossbeam-utils^0.80.8.21up to date
 crypto_secretbox^0.10.1.1up to date
 data-encoding^22.10.0up to date
 data-encoding-macro^0.10.1.19up to date
 derive_builder^0.200.20.2up to date
 derive_more^22.1.1up to date
 dialoguer^0.120.12.0up to date
 directories^66.0.0up to date
 educe^0.60.6.0up to date
 enumflags2^0.70.7.12up to date
 ethereum-types^0.160.16.0up to date
 ez-jsonrpc-types^0.50.5.2up to date
 fil_actor_account_state^24.1.324.1.3up to date
 fil_actor_cron_state^24.1.324.1.3up to date
 fil_actor_datacap_state^24.1.324.1.3up to date
 fil_actor_eam_state^24.1.324.1.3up to date
 fil_actor_ethaccount_state^24.1.324.1.3up to date
 fil_actor_evm_state^24.1.324.1.3up to date
 fil_actor_init_state^24.1.324.1.3up to date
 fil_actor_market_state^24.1.324.1.3up to date
 fil_actor_miner_state^24.1.324.1.3up to date
 fil_actor_multisig_state^24.1.324.1.3up to date
 fil_actor_paych_state^24.1.324.1.3up to date
 fil_actor_power_state^24.1.324.1.3up to date
 fil_actor_reward_state^24.1.324.1.3up to date
 fil_actor_system_state^24.1.324.1.3up to date
 fil_actor_verifreg_state^24.1.324.1.3up to date
 fil_actors_shared^24.1.324.1.3up to date
 flate2^11.1.9up to date
 fs_extra^11.3.0up to date
 fvm~4.74.7.5up to date
 fvm_actor_utils^1414.0.0up to date
 fvm_ipld_blockstore^0.3.10.3.1up to date
 fvm_ipld_encoding^0.5.30.5.3up to date
 fvm_ipld_kamt^0.4.50.4.5up to date
 fvm_shared~4.74.7.5up to date
 gethostname^11.1.0up to date
 git-version^0.30.3.9up to date
 group^0.130.13.0up to date
 hashbrown^0.160.16.1up to date
 hex^0.40.4.3up to date
 hickory-resolver^0.250.25.2up to date
 http^11.4.0up to date
 human-repr^11.1.0up to date
 humantime^22.3.0up to date
 indexmap^22.13.0up to date
 indicatif^0.180.18.4up to date
 integer-encoding^4.04.1.0up to date
 ipld-core^0.40.4.3up to date
 is-terminal^0.40.4.17up to date
 itertools^0.140.14.0up to date
 jsonrpsee^0.260.26.0up to date
 jsonwebtoken^1010.3.0up to date
 keccak-hash^0.120.12.0up to date
 kubert-prometheus-process^0.20.2.3up to date
 lazy-regex^33.6.0up to date
 libsecp256k1^0.70.7.2up to date
 md-5^0.100.10.6up to date
 memmap2^0.90.9.10up to date
 multiaddr^0.180.18.2up to date
 multihash-derive^0.90.9.1up to date
 multimap^0.100.10.1up to date
 nom^88.0.0up to date
 nonzero_ext^0.30.3.0up to date
 num^0.40.4.3up to date
 num-bigint^0.40.4.6up to date
 num-derive^0.40.4.2up to date
 num-rational^0.40.4.2up to date
 num-traits^0.20.2.19up to date
 num_cpus^11.17.0up to date
 nunny^0.20.2.2up to date
 openrpc-types^0.50.5.0up to date
 parity-db^0.50.5.4up to date
 parking_lot^0.120.12.5up to date
 pastey^0.20.2.1up to date
 pathfinding^44.14.0up to date
 pin-project-lite^0.20.2.17up to date
 positioned-io^0.30.3.5up to date
 pretty_assertions^11.4.1up to date
 prometheus-client^0.230.24.0out of date
 quick-protobuf^0.80.8.1up to date
 quick-protobuf-codec^0.30.3.1up to date
 rand^0.80.10.0out of date
 rand_chacha^0.30.10.0out of date
 rand_distr^0.40.6.0out of date
 rayon^11.11.0up to date
 regex ⚠️^11.12.3maybe insecure
 reqwest^0.130.13.2up to date
 rlimit^0.110.11.0up to date
 rlp^0.60.6.1up to date
 rs-car-ipfs^0.40.4.0up to date
 schemars^11.2.1up to date
 scopeguard^11.2.0up to date
 semver^11.0.27up to date
 serde_ipld_dagcbor^0.60.6.4up to date
 serde_json^11.0.149up to date
 serde_with^33.17.0up to date
 sha2^0.100.10.9up to date
 similar^22.7.0up to date
 slotmap^11.1.1up to date
 smallvec ⚠️^11.15.1maybe insecure
 smart-default^0.70.7.1up to date
 sonic-rs^0.50.5.7up to date
 spire_enum^11.0.0up to date
 stacker^0.10.1.23up to date
 static_assertions^11.1.0up to date
 statrs^0.180.18.0up to date
 strum^0.280.28.0up to date
 tabled^0.200.20.0up to date
 tap^11.0.1up to date
 tar ⚠️^0.40.4.44maybe insecure
 tempfile^33.26.0up to date
 tera^11.20.1up to date
 thiserror^22.0.18up to date
 tokio ⚠️^11.50.0maybe insecure
 tokio-stream^0.10.1.18up to date
 tokio-tungstenite^0.28.00.28.0up to date
 tokio-util^0.70.7.18up to date
 toml^11.0.6+spec-1.1.0up to date
 tower^0.50.5.3up to date
 tower-http^0.60.6.8up to date
 tracing^0.10.1.44up to date
 tracing-appender^0.20.2.4up to date
 tracing-subscriber ⚠️^0.30.3.22maybe insecure
 unsigned-varint^0.80.8.0up to date
 url^22.5.8up to date
 uuid^11.22.0up to date
 walkdir^22.5.0up to date
 zstd^0.130.13.3up to date
 console-subscriber^0.50.5.0up to date
 sqlx ⚠️^0.80.8.6maybe insecure
 tikv-jemallocator^0.60.6.1up to date
 tracing-loki^0.20.2.6up to date
 termios^0.30.3.3up to date

Dev dependencies

(24 total, 2 outdated)

CrateRequiredLatestStatus
 ariadne^0.60.6.0up to date
 assert_cmd^22.1.2up to date
 bimap^0.60.6.3up to date
 cargo_metadata^0.230.23.1up to date
 cbor4ii^0.21.2.2out of date
 criterion^0.80.8.2up to date
 cs_serde_bytes^0.120.12.2up to date
 derive-quickcheck-arbitrary^0.10.1.3up to date
 fickle^0.30.3.0up to date
 fvm_shared~4.74.7.5up to date
 glob^0.30.3.3up to date
 http-range-header^0.40.4.2up to date
 insta^11.46.3up to date
 num-bigint^0.40.4.6up to date
 petgraph^0.80.8.3up to date
 predicates^33.1.4up to date
 proc-macro2^11.0.106up to date
 quickcheck^11.1.0up to date
 quickcheck_macros^11.2.0up to date
 ra_ap_syntax^0.0.3210.0.323out of date
 regex-automata^0.40.4.14up to date
 serial_test^33.4.0up to date
 syn^22.0.117up to date
 tokio-test^0.40.4.5up to date

Crate forest-interop-tests

No external dependencies! 🙌

Security Vulnerabilities

chrono: Potential segfault in `localtime_r` invocations

RUSTSEC-2020-0159

Impact

Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.

Workarounds

No workarounds are known.

References

smallvec: Buffer overflow in SmallVec::insert_many

RUSTSEC-2021-0003

A bug in the SmallVec::insert_many method caused it to allocate a buffer that was smaller than needed. It then wrote past the end of the buffer, causing a buffer overflow and memory corruption on the heap.

This bug was only triggered if the iterator passed to insert_many yielded more items than the lower bound returned from its size_hint method.

The flaw was corrected in smallvec 0.6.14 and 1.6.1, by ensuring that additional space is always reserved for each item inserted. The fix also simplified the implementation of insert_many to use less unsafe code, so it is easier to verify its correctness.

Thank you to Yechan Bae (@Qwaz) and the Rust group at Georgia Tech’s SSLab for finding and reporting this bug.

tar: Links in archive can create arbitrary directories

RUSTSEC-2021-0080

When unpacking a tarball that contains a symlink the tar crate may create directories outside of the directory it's supposed to unpack into.

The function errors when it's trying to create a file, but the folders are already created at this point.

use std::{io, io::Result};
use tar::{Archive, Builder, EntryType, Header};

fn main() -> Result<()> {
    let mut buf = Vec::new();

    {
        let mut builder = Builder::new(&mut buf);

        // symlink: parent -> ..
        let mut header = Header::new_gnu();
        header.set_path("symlink")?;
        header.set_link_name("..")?;
        header.set_entry_type(EntryType::Symlink);
        header.set_size(0);
        header.set_cksum();
        builder.append(&header, io::empty())?;

        // file: symlink/exploit/foo/bar
        let mut header = Header::new_gnu();
        header.set_path("symlink/exploit/foo/bar")?;
        header.set_size(0);
        header.set_cksum();
        builder.append(&header, io::empty())?;

        builder.finish()?;
    };

    Archive::new(&*buf).unpack("demo")
}

This has been fixed in https://github.com/alexcrichton/tar-rs/pull/259 and is published as tar 0.4.36. Thanks to Martin Michaelis (@mgjm) for discovering and reporting this, and Nikhil Benesch (@benesch) for the fix!

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.

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);

sqlx: Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts

RUSTSEC-2024-0363

The following presentation at this year's DEF CON was brought to our attention on the SQLx Discord:

SQL Injection isn't Dead: Smuggling Queries at the Protocol Level
http://web.archive.org/web/20240812130923/https://media.defcon.org/DEF%20CON%2032/DEF%20CON%2032%20presentations/DEF%20CON%2032%20-%20Paul%20Gerste%20-%20SQL%20Injection%20Isn't%20Dead%20Smuggling%20Queries%20at%20the%20Protocol%20Level.pdf
(Archive link for posterity.)

Essentially, encoding a value larger than 4GiB can cause the length prefix in the protocol to overflow, causing the server to interpret the rest of the string as binary protocol commands or other data.

It appears SQLx does perform truncating casts in a way that could be problematic, for example: https://github.com/launchbadge/sqlx/blob/6f2905695b9606b5f51b40ce10af63ac9e696bb8/sqlx-postgres/src/arguments.rs#L163

This code has existed essentially since the beginning, so it is reasonable to assume that all published versions <= 0.8.0 are affected.

Mitigation

As always, you should make sure your application is validating untrustworthy user input. Reject any input over 4 GiB, or any input that could encode to a string longer than 4 GiB. Dynamically built queries are also potentially problematic if it pushes the message size over this 4 GiB bound.

Encode::size_hint() can be used for sanity checks, but do not assume that the size returned is accurate. For example, the Json<T> and Text<T> adapters have no reasonable way to predict or estimate the final encoded size, so they just return size_of::<T>() instead.

For web application backends, consider adding some middleware that limits the size of request bodies by default.

Resolution

sqlx 0.8.1 has been released with the fix: https://github.com/launchbadge/sqlx/blob/main/CHANGELOG.md#081---2024-08-23

Postgres users are advised to upgrade ASAP as a possible exploit has been demonstrated: https://github.com/launchbadge/sqlx/issues/3440#issuecomment-2307956901

MySQL and SQLite do not appear to be exploitable, but upgrading is recommended nonetheless.

tracing-subscriber: Logging user input may result in poisoning logs with ANSI escape sequences

RUSTSEC-2025-0055

Previous versions of tracing-subscriber were vulnerable to ANSI escape sequence injection attacks. Untrusted user input containing ANSI escape sequences could be injected into terminal output when logged, potentially allowing attackers to:

  • Manipulate terminal title bars
  • Clear screens or modify terminal display
  • Potentially mislead users through terminal manipulation

In isolation, impact is minimal, however security issues have been found in terminal emulators that enabled an attacker to use ANSI escape sequences via logs to exploit vulnerabilities in the terminal emulator.

This was patched in PR #3368 to escape ANSI control characters from user input.

bytes: Integer overflow in `BytesMut::reserve`

RUSTSEC-2026-0007

In the unique reclaim path of BytesMut::reserve, the condition

if v_capacity >= new_cap + offset

uses an unchecked addition. When new_cap + offset overflows usize in release builds, this condition may incorrectly pass, causing self.cap to be set to a value that exceeds the actual allocated capacity. Subsequent APIs such as spare_capacity_mut() then trust this corrupted cap value and may create out-of-bounds slices, leading to UB.

This behavior is observable in release builds (integer overflow wraps), whereas debug builds panic due to overflow checks.

PoC

use bytes::*;

fn main() {
    let mut a = BytesMut::from(&b"hello world"[..]);
    let mut b = a.split_off(5);

    // Ensure b becomes the unique owner of the backing storage
    drop(a);

    // Trigger overflow in new_cap + offset inside reserve
    b.reserve(usize::MAX - 6);

    // This call relies on the corrupted cap and may cause UB & HBO
    b.put_u8(b'h');
}

Workarounds

Users of BytesMut::reserve are only affected if integer overflow checks are configured to wrap. When integer overflow is configured to panic, this issue does not apply.