curl maintainer Daniel Stenberg says coding agents finished two high-profile Rust rewrites of libcurl in a few weeks—while upstream curl merged more than 300 commits and over 200 bugfixes those forks still lack. On November 17, 2026 he published a maintainer's view of AI-assisted wholesale rewrites: fascinating as a demo, risky as a dependency strategy for anyone whose Claude Code, Codex, or Cursor agents edit Dockerfiles, lockfiles, or vendored networking stacks.
If you only read the README of a "curl, but in Rust" repo, you might think memory safety solved the problem. Stenberg's numbers say otherwise—and they map directly to how agent-driven refactors behave on your laptop.
TL;DR
| Question | Answer |
|---|---|
| Am I affected? | Yes if agents can add dependencies, swap HTTP clients, or open mega-refactor PRs on infrastructure code |
| Is there a fix? | Pin maintained libcurl, reject surprise Rust rewrites in agent PRs, review TLS/HTTP dependency diffs like supply-chain changes |
| Did agents beat upstream curl? | No—Stenberg says they snapshot a moment in time while curl kept shipping fixes |
| Does Rust erase curl CVEs? | Only ~17% of 2026 confirmed issues by Stenberg's public count |
| Does data leave my machine? | Depends on the agent; rewriting curl did not require exfil, but agents often phone home to model APIs while generating ports |
What Stenberg described
Stenberg writes that fall 2026 brought two visible curl-in-Rust efforts:
- urlx, described earlier in the year as a from-scratch, memory-safe take on curl/libcurl.
- A November project that reused the curl name while rewriting libcurl in Rust—he says it publicly claimed about $8,600 in estimated API spend to generate the port.
His central claim is not that Rust is useless. It is that writing code once was never curl's hard problem:
Writing code once was never the big deal with software and it still isn't.
Agents succeeded, he argues, because curl is a perfect training-corpus project: public C sources, extensive docs, hundreds of downstream apps, and thousands of tests the rewrite could chase until green.
The statistical punchline is a side-by-side clock:
| Metric (per Stenberg, Nov 2026) | AI Rust rewrite window | Upstream curl |
|---|---|---|
| Lines converted | ~185,000 C → ~340,000 Rust | Ongoing commits (~11/day average) |
| Commits merged | N/A (snapshot) | 300+ in a little over three weeks |
| Bugfixes landed | Not in clones | 200+ in same window |
| Vulnerabilities fixed | Not in clones | Several in same window |
Image: daniel.haxx.se
Stenberg has not spoken with the rewrite authors; he knows the repos only from links supporters sent. He is openly amused and puzzled—not threatening legal action—but he asks the question agent operators should ask too: "Will these clones keep up?"
Why a snapshot loses to maintenance
Stenberg's argument parallels GitHub's MDASH pilot findings: agents can close many reported issues quickly on a static tree, yet security is a process measured in merged advisories, not initial LOC.
curl's moat, in his telling, is community velocity, ABI/API stability over decades, and the feedback loop from production users—not merely the language the transfer library is written in. A rewrite that passes today's tests still inherits yesterday's threat model unless someone ports tomorrow's CVE fixes.
That is the same failure mode as agents that:
- regenerate an entire module instead of applying a minimal security patch from an advisory;
- propose cargo add on a typosquatted crate name mimicking curl;
- or "modernize" networking by pointing CI at an unmaintained Rust port.
Bitdefender's November 2026 roundup shows attackers already optimize for developer trust paths—curl-like names and setup scripts are high leverage.
Memory safety is partial, not magic
Stenberg repeats a figure he says is verifiable from public curl data: 81 confirmed vulnerabilities in curl through 2026, of which 14 (17.3%) were mistakes most likely avoided in a memory-safe language like Rust. A Rust line-for-line port could still have shipped ~67 issues in his accounting—protocol confusion, logic bugs, misconfiguration, trust-boundary errors.
That nuance matters when agents argue "rewrite for safety" in a single PR. Brotli/CVE work on curl consumers shows downstream stacks discover flaws through ecosystem scanning, not only language choice.
Attack chain: agent wholesale rewrite as supply-chain risk
Think of an unsolicited Rust curl port as a four-step chain your harness might execute without malice:
- Task framing — Agent reads "make transfers memory safe" or "replace libcurl" from a ticket, skill, or README (indirect prompt injection uses the same reframing trick).
- Bulk generation — Agent translates or regenerates hundreds of thousands of lines, optimizing for tests green on day one.
- Dependency swap — Agent updates Dockerfiles,
Cargo.toml, or system packages to prefer the rewrite artifact. - Stale fork — Upstream curl keeps fixing CVEs; the new dependency does not, but CI no longer compares versions against curl.se advisories.
None of that requires an evil model—only automation without a maintainer loop. It rhymes with agentic backdoors that used curl | bash patterns, except here the risk is benign-looking modernization.
How agents should port instead of rewrite
Stenberg closes with "no rewrites"—only "constant and never-ending polishing, iterating and refactoring." That advice lands differently when your agent defaults to greenfield PRs:
- Incremental parity (recorded behavior tests, narrow crate boundaries) matches how serious shops migrate languages; explainx.ai's rust-anything parity harness write-up describes MCP-assisted parity checks as an alternative to monolithic ports.
- Cherry-pick security commits from curl.se advisories instead of trusting a Rust tree that last synced before the advisory dropped.
- Keep ABI consumers on libcurl until a rewrite proves it can ship compatible soname behavior—Stenberg highlights decades of API and ABI stability as something a November fork cannot claim on day one.
When an agent proposes FROM rust:1.91 plus a vendored git dependency named like curl, treat it like inviting a new maintainer team you have never met into your TLS path.
Checking what your stack actually runs
Operators often discover drift only after an incident. After agent-edited Dockerfiles or Homebrew bundles, run a short checklist Stenberg's post implies but does not spell out for CI:
curl --version
which curl
ldd "$(which curl)" 2>/dev/null | grep -i curl || true
On macOS replace ldd with otool -L. In language projects, grep lockfiles for curl-sys, isahc, reqwest native TLS backends, and any crate whose README claims full libcurl compatibility without linking to curl's release branch.
If versions lag distro security notices you already track for other packages, the agent did not "modernize" you—it froze you.
What developers are saying
Hacker News discussion on Stenberg's post (comment thread) split along predictable lines:
-
goodmythical said the post was "eye-opening" about curl's invisible maintenance cadence—thousands of contributors and issues closed—arguing observers underestimate how fast upstream moves compared with a one-off rewrite.
-
fschuett pushed back that Rust's portability and composability still matter, and that 20% fewer vulns is still 20% fewer, even if maintenance remains essential.
-
viraptor challenged the $8,600 figure as API-equivalent pricing rather than real subscription cost, and argued some non-memory curl bugs might still be easier to prevent in Rust's type system—without disagreeing that snapshots drift.
-
ahartmetz questioned the 1.9× line-count expansion from C to Rust as a portability smell.
-
pjmlp compared today's Rust-rewrite hype to C-to-C++ waves decades ago, warning that ecosystem fatigue can hurt adoption even when individual ports are technically interesting.
Treat these as community reports, not measurements—but they reinforce Stenberg's policy point: debate language advantages after you commit to merging upstream fixes forever.
Stenberg's tone—amused, not litigious—matters for agent operators: these rewrites are not automatically malware. They are competing maintenance stories. Your job is to ensure agents do not silently bet your production path on the story that stops merging CVEs in March while upstream still fixes them in April.
What this means if you run AI coding agents
Concrete controls for the next agent session:
- Ban silent HTTP stack swaps. Require human review when diffs touch
libcurl,openssl,rustls, or wrapper crates claiming curl compatibility. - Prefer advisory-scoped patches. When Java4Shell-style AI discovery or curl advisories land, instruct agents to backport fixes on the supported branch—not regenerate the module.
- Log version pins. After agent edits, run
curl --versionin CI and store output next to Harvard's code-review bottleneck findings so reviewers see networking changes amid noise. - Treat rewrite READMEs like new vendors. Scan install scripts with the same skepticism as malicious setup.js repos; ask who signs releases and how security patches propagate.
- Scope agent refactors. Prime Radiant-style sandboxes limit blast radius while experimenting, but sandbox success does not prove production update velocity.
explainx.ai's rust-anything incremental parity piece discusses recorded-behavior rewrites as an alternative pattern; Stenberg's post is the maintainer counterweight—living upstream beats a frozen translation.
What Beam can and cannot do here
Beam is local observability and hook-based policy for supported coding agents: it adapts PreToolUse events for Claude Code and Codex, scans skills and MCP configs with 11 heuristic patterns plus an MCP version-pin check (including risky shell idioms), and can deny configured tool actions when workspace enforce mode and fresh cached policy align. See agent hooks documentation.
For rewrite-heavy agent sessions, Beam helps you see large destructive diffs, curl | bash patterns in generated scripts, and credential touches—but it does not choose between libcurl and a Rust reimplementation, does not perform semantic code review on 300k LOC ports, and does not replace package-signature verification. Missing cached policy remains fail-open on deny.
Pair Beam with /#watches logging on your machine and explicit CODEOWNERS on networking directories so agent snapshots cannot merge while maintainers are still shipping CVE fixes upstream.
Frequently asked questions
Did AI agents rewrite curl in Rust in 2026?
Yes—Stenberg documents at least two public Rust-oriented efforts in fall 2026, with agents translating roughly 185k lines of C to 340k lines of Rust using curl's public sources and tests. Details are in his November 17 post.
How far behind upstream are AI curl rewrites?
He says upstream merged 300+ commits and 200+ bugfixes during the rewrite window, fixes absent from the clones unless authors continuously port them.
Would a Rust curl prevent all curl vulnerabilities?
No—his 2026 accounting lists 81 confirmed issues, with only 14 likely memory-safety class.
How much did the cited AI curl rewrite cost?
The project claims ~$8,600 API-equivalent; commenters dispute whether subscription pricing makes the real spend far lower.
Should coding agents replace libcurl with an AI Rust port?
Stenberg recommends ongoing maintenance on curl rather than a one-shot rewrite; operators should treat agent-proposed swaps as supply-chain decisions.
Why can agents clone curl so quickly?
Public sources, tests, docs, and training-data prevalence make translation tractable; sustaining fixes is not.
Does Beam stop agents from swapping in a fake curl binary?
Beam can deny configured risky tools and scan skills; it does not verify package signatures or pick HTTP libraries for you.
What should I run to check which curl my agents use?
Run curl --version on developer machines and CI images after agent edits, and track distribution packages against official curl security advisories.
Related reading
- GitHub MDASH: verified fixes on FastMCP, Express, and ImageMagick
- Agentic backdoors and curl | bash in CLI agents
- Bitdefender: malicious setup.js repos targeting coding-agent users
- Brotli CVE detection across Python, Bun, Envoy, and curl
- Java4Shell and agent-driven emergency patching
- Harvard: AI coding agents versus human review throughput
curl commit counts, vulnerability totals, and rewrite cost claims are accurate as of November 18, 2026 per Daniel Stenberg's post. Verify current curl versions with curl --version and curl.se security advisories before changing production images agents maintain.

