Trail of Bits engineering blog

Loading
After Binance, check what your signing systems can approve
Trail of Bits analyzes the October 2026 Binance incident, in which an attacker abused an EIP-7702 delegation to set a standing authority that enabled repeated transfers without fresh signatures. The post gives a four-step checklist covering restricting signing access, treating delegation as an administrative privilege, limiting damage if signing is compromised, and detecting wallet authority changes, each with verification tests.
The cryptography behind electronic voting (and why paper ballots are still essential)
The post explains how cryptography supports ballot secrecy and end-to-end verifiability in electronic voting, covering threshold-shared keys, additively homomorphic exponential ElGamal tallying, Benaloh challenges, and hash-chained ballot commitments as used in Helios and ElectionGuard. It also argues that paper ballots remain essential for general elections because electronic systems lack software independence.
Backporting security fixes at scale with Codex
Trail of Bits describes using Codex agents to cut the time needed to backport security fixes to stable Linux kernels and distribution packages, reducing human review to roughly 30 minutes to three hours per patch. The post quantifies the backlog of unfixed CVEs across kernel stable branches, Debian 13, and Ubuntu 26.04, and reports 149 CVE fixes applied so far.
Your AI agent fixed the bug, but what else did it change?
Trail of Bits introduces two open-source agent plugins, patching-bugs and regression-hunt, for delegating patch development and regression checks to coding agents. The post details how a review of 21 confirmed regressions from merged patches shaped the design, including live proof-of-concept requirements, strict schemas, a three-arm proof, and threat-model-driven adjudication. Preliminary evaluation shows regression-hunt yields 25% fewer false positives than a baseline Codex prompt, with a...
Package managers have an integrity problem
Trail of Bits tested 25 popular package managers to see whether they detect a compromised package repository injecting malicious code into legitimate packages. Fewer than half verified lockfile hashes by default, and only two verified every downloaded package, with signature verification found to be similarly inconsistent. The post compares hash, lockfile, signing, and transparency-log designs and proposes storing signer identities in lockfiles.
SequenceHash: multihashing for the rest of us
Trail of Bits introduces SequenceHash and SequenceMAC, hash-agnostic constructions for safely combining variable-length inputs without ambiguity or length-extension vulnerabilities. The post explains their encoding, domain-separation, keyed mode, implementation APIs, security trade-offs, and available Rust, Go, and Python implementations.
Don't let TEEs break your MPC
The post examines how trusted execution environments interact with multi-party computation and threshold signatures, highlighting trust-model clashes, attestation gaps, rollback attacks, side channels, and centralization risks. It provides concrete deployment guidance, including binding attestations to MPC identities, verifying measurements, using constant-time code, and diversifying TEE vendors.
SAML: A fractal of bad design
The post examines why SAML’s XML foundation, canonicalization, enveloped signatures, kitchen-sink design, and ossification create persistent security and implementation problems. It recommends migrating authentication providers and service providers toward OIDC, with practical guidance for planning SAML deprecation.
Auditing in the age of (good enough) AI
The post details how Trail of Bits used AI agents to build an LSP server, decompiler, static-analysis engine, and Lean model while auditing the Miden zero-knowledge VM. These tools uncovered hundreds of validation weaknesses, a signature-forging vulnerability, and subtle arithmetic bugs, while producing 95 machine-checked correctness proofs.
1Password's AI patching benchmark is misleading
Trail of Bits analyzes why 1Password’s AI patching benchmark produces a misleading headline, citing biased sampling, restricted testing, and unreliable grading. It compares human and agent patch quality and introduces validation and review skills for detecting incomplete fixes, regressions, and new vulnerabilities.
A “proof” of Fermat’s Last Theorem that fits the margin
Trail of Bits analyzes a Lean bug in String.Pos.Raw.extract that caused logical and native evaluation to disagree, allowing a contradictory “proof” of Fermat’s Last Theorem. The post explains the failure mode, remediation, and why native evaluation expands the trusted computing base for machine-checked proofs.
VMs won't contain cyber-capable agents
The post demonstrates how a cyber-capable AI agent escaped a QEMU/KVM virtual machine through chained Linux KVM, QEMU, and libslirp vulnerabilities, including undisclosed flaws. It explains why conventional VM isolation is insufficient and recommends minimizing attack surfaces, applying upstream security updates rapidly, using hardened virtualization such as Firecracker, and enforcing least privilege and monitoring.
State divergence enables unauthorized access
Trail of Bits analyzes a Provenance Blockchain authorization bypass caused by stale token-supply state, allowing attackers to self-grant marker administration and mint or withdraw assets. It explains the impact across 82 markers, the two-stage fix, and testing principles for preventing zero-state authorization failures.
How Trail of Bits helps verify the integrity of your Signal chats
Trail of Bits explains how Signal’s Automatic Key Verification uses key transparency, Merkle trees, and independent auditors to detect malicious or inconsistent public-key mappings. The post details the auditor’s signing model, its seven-day detection window, and how users can enable the feature.
A few notes on AWS Nitro Enclaves: KMS integration
The post analyzes security and operational risks in integrating AWS Nitro Enclaves with KMS, covering attestation, passive and active attacks, key substitution, replay, policy design, TLS, and key lifecycle management. It provides practical checklists and mitigations for building and auditing enclave-based systems.
Building secure Uniswap v4 hooks
The post analyzes seven recurring security failures in Uniswap v4 hooks, including missing authorization, malicious pool routing, faulty accounting, permission-bit mismatches, callback reentrancy, and denial-of-service risks. It provides concrete development and auditing guidance, including invariants, allowlists, safe callback patterns, and adversarial testing strategies.
How we use /goal to find bugs in Patch the Planet
Trail of Bits explains how it uses Codex’s /goal mode to discover vulnerabilities in heavily audited open-source projects. The post presents practical techniques for writing precise success criteria, separating competing objectives across agents, validating findings, and applying human security review.
Rust-proof your code with our new Testing Handbook chapter
Trail of Bits introduces a comprehensive Rust security-testing handbook chapter covering dynamic analysis with Miri and proptest, coverage and mutation testing, Clippy, manual-review footguns, memory zeroization, model checking, and dependency supply-chain vetting. It also highlights an automated Rust security-review plugin and practical techniques for finding subtle vulnerabilities.
Mutation testing comes to DAML
Trail of Bits explains how Mewt brings mutation testing to DAML, exposing gaps that traditional coverage reports miss. It details DAML-specific controller mutations, surviving-mutant analysis, setup with dpm, and practical limits such as equivalent mutants and campaign cost.
GPT-5.5-Cyber built a zlib fuzzing lab in a day
Trail of Bits reports how GPT-5.5-Cyber built a bespoke zlib fuzzing campaign in one day, combining sanitizer builds, seed corpora, variant configurations, and harnesses across a dozen entry points. The report highlights the importance of validating real-world reachability and filtering noisy findings.