EVERYTHING XIAOMI
Get listed

cargo-fuzz

cargo-fuzz is a free, open-source Cargo subcommand for fuzzing Rust code with libFuzzer.

Place
#5 of 26
Score
6.7
cargo-fuzz's website

What cargo-fuzz is

cargo-fuzz is a free, open-source Cargo subcommand for fuzzing Rust code with libFuzzer. It invokes a fuzzer rather than providing one itself, and the Rust Fuzz Book recommends it for Rust fuzz testing. Run `cargo fuzz init` to set up fuzzing files for a crate, then `cargo fuzz add <target>` to make a target and `cargo fuzz run <target>` to search for bugs. The tool can minimize a failing input or a corpus of inputs, and version 0.10.0 or newer can generate source-based coverage information. Its documentation includes structure-aware fuzzing and a GitHub Actions workflow for running targets in CI. Supported systems listed include x86-64 Linux, x86-64 and Apple-Silicon macOS, and Windows with LLVM sanitizer support; Windows programs can also use MSVC AddressSanitizer. The project requires the nightly Rust compiler because it uses a `-Z` compiler flag for address sanitization, as well as a C++ compiler with C++11 support. It is distributed under the MIT and Apache 2.0 licenses.

Good

  • Creates and runs fuzz targets for Rust crates
  • Can minimize failing inputs and input corpora
  • Supports structured fuzzing
  • Documentation includes a GitHub Actions workflow

Watch out

  • Requires the nightly Rust compiler
  • Requires a C++ compiler with C++11 support

Who it suits

cargo-fuzz suits Rust developers who want to search their code for bugs using fuzz targets. It fits teams that can use a nightly Rust compiler and a C++11-capable compiler, including those running fuzzing in CI.

Verdict

cargo-fuzz provides a command-line workflow for creating targets, running libFuzzer, and managing fuzzing inputs. Check its compiler requirements and supported system setup before incorporating it into a project.

Plans and prices

From cargo-fuzz's own pricing page, checked 2 Oct 2026.

All about pricing
PlanPriceWhat it gives you
cargo-fuzzFreeMIT license · Apache License (Version 2.0)

The facts

Each one read from cargo-fuzz's own pages, with the date it was checked.

What it does

Build requirement
The setup requires a C++ compiler with C++11 support.checked 2 Oct 2026
CI integration
The documentation provides a GitHub Actions workflow that installs cargo-fuzz, builds targets, runs them for a configured time, and uploads artifacts on failure.checked 1 Oct 2026
Compiler requirement
The project requires the nightly Rust compiler because it uses the -Z compiler flag for address sanitization.checked 2 Oct 2026
Configuration
Fuzz targets can use Cargo feature options including --features, --no-default-features, and --all-features.checked 2 Oct 2026
Corpus minimization
cargo fuzz tmin minimizes a failing input and cargo fuzz cmin minimizes a corpus of input files.checked 2 Oct 2026
Coverage
cargo fuzz coverage generates source-based code coverage information from a fuzz target and corpus.checked 2 Oct 2026
Fuzzer support
cargo-fuzz is a tool to invoke a fuzzer, and currently supports only libFuzzer through the libfuzzer-sys crate.checked 2 Oct 2026
Fuzz execution
`cargo fuzz run <target>` runs a fuzzing target to find bugs.checked 1 Oct 2026
Fuzz targets
cargo fuzz add creates a new fuzzing target and cargo fuzz run runs a fuzzing target to find bugs.checked 2 Oct 2026
Input minimization
The tool provides `cargo fuzz tmin` to minimize a failing input and `cargo fuzz cmin` to minimize a corpus of input files.checked 1 Oct 2026
Installation
The documented installation command is cargo install cargo-fuzz.checked 2 Oct 2026
Licensing
cargo-fuzz is distributed under both the MIT license and Apache License Version 2.0.checked 1 Oct 2026
Package metadata
The Cargo package is version 0.13.2 and lists its authors as The rust-fuzz Project Developers.checked 1 Oct 2026
Project setup
cargo fuzz init initializes a cargo-fuzz project for a crate.checked 2 Oct 2026
Purpose
cargo-fuzz is a cargo subcommand for fuzzing with libFuzzer.checked 2 Oct 2026
Recommended use
The Rust Fuzz Book describes cargo-fuzz as the recommended tool for fuzz testing Rust code.checked 2 Oct 2026
Security status
GitHub reports that the repository has no security policy detected and no published security advisories.checked 2 Oct 2026
Structured fuzzing
The documentation supports structure-aware fuzzing through the fuzz_mutator! macro and the Arbitrary trait.checked 2 Oct 2026
Supported systems
The setup documentation lists x86-64 Linux, x86-64 macOS, Apple-Silicon macOS, and Windows with LLVM sanitizer support.checked 1 Oct 2026

Where it runs

Platforms
The setup documentation lists x86-64 Linux, x86-64 macOS, Apple-Silicon macOS, and Windows support.checked 2 Oct 2026
Windows integration
cargo-fuzz can fuzz Windows programs using MSVC AddressSanitizer.checked 1 Oct 2026
The full review of cargo-fuzz

cargo-fuzz is a Rust fuzzing workflow built around Cargo and libFuzzer, suited to developers who want to find bugs in crate code locally. Its target-management and input-reduction commands make it a practical choice for Rust projects, provided nightly Rust and a C++11-capable compiler fit the build environment.

Overview

This Cargo subcommand invokes libFuzzer through the libfuzzer-sys crate; it coordinates fuzzing rather than supplying a fuzzer of its own. The Rust Fuzz Book recommends it for fuzz testing Rust code, which makes it a credible default for that language—but not a general-purpose choice for teams fuzzing unrelated stacks.

Installation uses cargo install cargo-fuzz. Address sanitization depends on Rust's -Z compiler flag, so nightly Rust is required, as is a C++ compiler with C++11 support. Those native-toolchain requirements are real adoption costs, particularly for projects that standardize on stable Rust or tightly controlled build environments.

Key features

Targets and execution

cargo fuzz init creates fuzzing files for a crate, and cargo fuzz add <target> creates a target. Run it with cargo fuzz run <target> to search for bugs. Cargo feature options—including --features, --no-default-features and --all-features—let a target exercise different crate configurations, a useful way to cover behavior that depends on feature selection.

Input reduction and coverage

cargo fuzz tmin minimizes a failing input, while cargo fuzz cmin minimizes a corpus. These commands help turn a large or unwieldy fuzzing result into a smaller case to investigate. cargo fuzz coverage generates source-based coverage information, but requires cargo-fuzz 0.10.0 or newer.

Structured fuzzing and CI

For inputs that follow a data structure rather than arbitrary bytes, the documentation supports structure-aware fuzzing with the fuzz_mutator! macro and Arbitrary trait. A documented GitHub Actions workflow installs cargo-fuzz, builds targets, runs them for a configured time and uploads artifacts on failure. That gives teams a route to recurring CI fuzzing, though the workflow still depends on their compiler and native build setup.

Pricing

cargo-fuzz is free and open source under the MIT License and Apache License Version 2.0. Its plan costs free, making it accessible for individual developers and teams without a paid tier to evaluate. The trade-off is a local, tool-focused workflow rather than a priced hosted service.

Platforms

Supported platforms are Linux, macOS and Windows. The documented system setup covers x86-64 Linux, x86-64 macOS, Apple-Silicon macOS, and Windows with LLVM sanitizer support; Windows fuzzing can use MSVC AddressSanitizer. Platform labels alone do not remove the compiler and sanitizer prerequisites, so check that the intended system has a compatible setup.

Who it's for

Choose cargo-fuzz if you maintain Rust code and want to add fuzz targets, run them locally, reduce failing inputs and optionally integrate runs into GitHub Actions. Its focus and Cargo-oriented commands suit Rust developers more than teams seeking broad language coverage or a hosted fuzzing service. The nightly compiler requirement is also a poor fit for a workflow that cannot accommodate nightly builds.

Pros and cons

  • Pros: A focused Cargo workflow covers target creation, execution, corpus and failure minimization, and source-based coverage.
  • Pros: Structure-aware input support and a documented GitHub Actions workflow extend its use beyond ad hoc local runs.
  • Pros: Free, dual-licensed software avoids a per-seat or usage fee.
  • Cons: It currently relies on libFuzzer through libfuzzer-sys, so it is not a menu of different fuzzing engines.
  • Cons: Nightly Rust and a C++11-capable compiler add setup and maintenance constraints.
  • Cons: The workflow is centered on Rust code and local execution, limiting its fit for other languages or teams seeking a hosted platform.

Alternatives

Browse fuzz testing software if you want to compare tools across the category. Consider ClusterFuzz instead if you want an open-source option spanning Linux, macOS, Windows, web and self-hosted platforms; its production deployment depends on Google Cloud services. Accessibility Test Framework for Android is another free option, focused on Android accessibility testing.

AFL++ is worth considering if its Android, Linux, Windows or self-hosted platform support better matches your environment; its free software is distributed under AGPL-3.0-or-later. Choose Mayhem if API scanning and a paid option are a better fit: its API free plan allows up to 50 scans per month, and paid plans cost $236 a month.

boofuzz is a free Python library for building fuzzer scripts, making it a more relevant candidate when Python is central to the work. Fuzzilli is free source code for JavaScript-engine fuzzing, but requires building the fuzzer and using a supported, instrumented engine. For JVM coverage-guided, in-process fuzzing, consider Jazzer, which supports Linux, macOS and Windows. EvoMaster is a free open-source option across API, Linux, macOS, self-hosted and Windows platforms, with no paid external services required.

Verdict

Rust developers who can use nightly Rust and meet the C++ build requirement should choose cargo-fuzz for its direct path from crate targets to libFuzzer runs, minimized failures and coverage. Look elsewhere if your project needs another language, a different fuzzing engine or a hosted workflow; cargo-fuzz's focused scope is its strength and its boundary.

Getting started

  1. Open https://github.com/rust-fuzz/cargo-fuzz
  2. Install cargo-fuzz with `cargo install cargo-fuzz`
  3. Use the nightly Rust compiler and a C++11-capable C++ compiler
  4. Run `cargo fuzz init` in a Rust crate
  5. Create a fuzz target with `cargo fuzz add <target>`
  6. Run it with `cargo fuzz run <target>`

Limits worth knowing

The tool requires nightly Rust and a C++11-capable compiler. Source-based coverage requires cargo-fuzz version 0.10.0 or newer.

Questions

Is cargo-fuzz free?

Yes. The cargo-fuzz plan costs nothing and is distributed under the MIT and Apache License 2.0 licenses.

Which platforms does cargo-fuzz support?

It supports x86-64 Linux, x86-64 macOS, Apple-Silicon macOS, and Windows with LLVM sanitizer support. Windows programs can also be fuzzed using MSVC AddressSanitizer.

What fuzzer does cargo-fuzz use?

cargo-fuzz invokes libFuzzer through the libfuzzer-sys crate.

How do I create and run a fuzz target?

Use `cargo fuzz init` to create fuzzing files, `cargo fuzz add <target>` to add a target, and `cargo fuzz run <target>` to run it.

Can cargo-fuzz minimize failures and corpora?

Yes. `cargo fuzz tmin` minimizes a failing input, and `cargo fuzz cmin` minimizes a corpus of input files.

Does cargo-fuzz support CI?

Yes. Its documentation provides a GitHub Actions workflow that installs the tool, builds targets, runs them for a configured time, and uploads failure artifacts.

Alternatives to cargo-fuzz

All alternatives
  1. 1

    Jazzer

    Free planOpen sourceAPILinuxmacOSSelf-hosted
    7.3Free plan
  2. 2

    AFL++

    Free planAndroidLinuxmacOSSelf-hosted
    7.2From €20,000 a year
  3. 3Mayhem logo

    Mayhem

    Free planWebAPILinuxmacOS
    7.0From $236 a month
  4. 4ClusterFuzz logo

    ClusterFuzz

    Free planWebLinuxmacOSSelf-hosted
    6.8Free plan
  5. 5

    boofuzz

    Free planAPILinuxSelf-hostedWindows
    6.4Free plan
  6. 6

    EvoMaster

    Free planAPILinuxmacOSSelf-hosted
    6.4Free plan