STITCH++
Write small typed stubs defining your API. STITCH++ automatically fuzzes valid combinations of endpoints, generates arguments, and finds crashes, exceptions, and failed checks.
Documentation · Tutorial · CLI reference · Example projects · Paper
How it works
A harness is a set of endpoints: small typed stubs that each call your API.
STITCH_OBJECT(Store, kv_store*);
STITCH_OBJECT(Snapshot, kv_store*);
New<Store> load(Str<256> text) {
kv_store* st = kv_load(text.c_str());
stitch::require(st, "invalid text");
return st;
}
STITCH_ENDPOINT(load);
void put(Borrow<Store> st, Str<16> key, Str<32> value) {
stitch::require(kv_put(st, key.c_str(), value.c_str()) == 0, "invalid key or value");
}
STITCH_ENDPOINT(put);
void remove_key(Borrow<Store> st, Str<16> key) { kv_remove(st, key.c_str()); }
STITCH_ENDPOINT(remove_key);
New<Snapshot> snapshot(Borrow<Store> st) {
char* text = kv_dump(st);
kv_store* copy = kv_load(text);
free(text);
stitch::require(copy, "dump did not load");
return copy;
}
STITCH_ENDPOINT(snapshot);
- Objects (
Store,Snapshot) pass from one call to the next.New<T>makes one,Borrow<T>uses it,Take<T>consumes it. - Fuzzed parameters (
Str<16>, integers, bytes) are generated by the fuzzer. requirerejects an input.checkasserts a property; a failed check is reported as a bug.
The fuzzer stitches endpoints into programs, keeps the ones that reach new code, and mutates both the arguments and the calls. A crash it found, minimized:
st = load("")
put(st, "tmp", "")
remove_key(st, "tmp")
snapshot(st) // AddressSanitizer: heap-use-after-free in kv_dump
Install
pip install stitch-fuzz
stitch setup --lang python
Requires Docker. The library, the harness and the fuzzer run in containers.
A project pins the STITCH++ release it is written for in its stitch.toml
(stitch_version = "0.2.0"); install that version to work on it. What changed between releases,
and what a harness has to change to upgrade: CHANGELOG.md.
Languages
C/C++ · Python · JavaScript · Java · Go · Rust · Ruby · Swift · Objective-C
How each language is instrumented
| Language | Coverage | Comparisons (cmplog) | Bugs detected |
|---|---|---|---|
| C/C++ | SanitizerCoverage (clang) | trace-cmp, memcmp/strcmp hooks |
ASan, UBSan, uncaught exceptions |
| Python | sys.monitoring line and branch events |
AST rewrite of ==, !=, in, < |
undeclared exceptions |
| JavaScript | Babel plugin (CommonJS hook and ESM loader) | Babel rewrite of === and switch; String/Set/Map hooks |
undeclared exceptions, prototype pollution, unhandled rejections |
| Java | Java agent, counters per basic block | if_icmp, lcmp, switch, String.equals/startsWith, Map.get |
undeclared Throwables |
| Go | -d=libfuzzer 8-bit counters |
libfuzzerTraceCmp*, libfuzzerHookStrCmp |
panics, fatal errors, data races (-race, optional) |
| Rust | SanitizerCoverage | trace-compares, ASan memcmp hooks |
panics (including overflow checks), ASan |
| Ruby | Prism source rewriting | rewritten ==, <, eql?, start_with?, include?, case/when |
undeclared exceptions |
| Swift | SanitizerCoverage | trace-cmp |
traps (bounds, overflow, nil unwrap), ASan |
| Objective-C | SanitizerCoverage (clang, GNUstep) | trace-cmp, memcmp/strcmp hooks, NSString comparison wrappers |
Objective-C exceptions, ASan, UBSan |
In every language, failed checks in your stubs and timeouts are reported too. Details:
languages/README.md.
Citation
@inproceedings{green2026stitching,
title = {Automatic, Expressive, and Scalable Fuzzing with Stitching},
author = {Green, Harrison and Brown, Fraser and Le Goues, Claire},
booktitle = {Proceedings of the 2026 ACM SIGSAC Conference on Computer and Communications Security},
series = {CCS '26},
publisher = {ACM},
address = {The Hague, Netherlands},
pages = {1582--1596},
year = {2026},
doi = {10.1145/3830454.3846663}
}
License
Metadata
Release files for stitch-fuzz 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stitch_fuzz-0.2.0.tar.gz | 505.1 kB | With provenance | Details for stitch_fuzz-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stitch_fuzz-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for stitch_fuzz-0.2.0-py3-none-any.whl |
Total release size: 1.1 MB
Release files / stitch_fuzz-0.2.0.tar.gz
| Download URL | stitch_fuzz-0.2.0.tar.gz |
|---|---|
| Size | 505.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c2ecc6c45888907750f50fe601ca95b292ff77253e7fc46f62f8a517e3b0595
|
|
BLAKE2b-256 checksum How to use checksums |
d1e09d0db1e5fc712d1701564af9aea033864c0a52e4988e456b796e021d4e79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / stitch_fuzz-0.2.0-py3-none-any.whl
| Download URL | stitch_fuzz-0.2.0-py3-none-any.whl |
|---|---|
| Size | 569.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5bd52699d18031cb49b752d16169a11d5b101b3b1ff2505a176ebc75514ee1d
|
|
BLAKE2b-256 checksum How to use checksums |
ebcc1482f34475bcbf38422034576c163f2579d158e0f0b434a804c54e560b2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for stitch-fuzz 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for stitch_fuzz-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.