Skip to content

v0.5.0

Choose a tag to compare

@physics515 physics515 released this 25 Sep 22:01
4c7b8f1

This release fixes a security flaw in how clearnet HTTPS was authenticated. If you fetch clearnet sites over Tor with artiqwest, upgrade.

Fixed — clearnet TLS certificates are now verified

Every version before this one built its TLS connector with danger_accept_invalid_certs(true) unconditionally, so an HTTPS request accepted whatever certificate it was handed.

For an onion service that is correct and necessary — no public CA issues certificates for .onion, and the address itself is the identity. But it applied to clearnet hosts too, which meant transport authenticity was never checked, and the Tor exit relay is precisely the position from which to substitute a certificate. Tor conceals who is asking; it says nothing about whether the far end is who it claims to be.

Certificate handling is now decided per host:

  • Clearnet hosts are verified against the platform trust store, chain and hostname, exactly as any other HTTPS client would.
  • Onion services remain exempt, because the hostname is derived from the service's public key and the Tor protocol authenticates it during the rendezvous.

The exemption matches on the final label only, so a clearnet lookalike such as onion.example.com — a domain anyone can register — is verified normally and cannot inherit it. .onion is reserved by RFC 7686 and cannot exist in the public DNS, which is what makes that rule sound.

Both the request path (get, post) and the websocket path (ws) are covered.

⚠️ Breaking behavior change

If you were relying on artiqwest to reach a clearnet host with a self-signed, expired, or otherwise invalid certificate, that request now fails. That is the intent of the fix, but it can break code that works on 0.4.1 — which is why this is a minor release rather than a patch.

There is no opt-out in this release. Adding a danger_* escape hatch is against the project's locked design decisions, and the right home for one is the request builder that does not exist yet. If you need to talk to a host with a private CA or a self-signed certificate today, pin 0.4.1 and follow the request-builder item on the roadmap.

Onion services are unaffected — they behave exactly as before.

No API changes

Function signatures are unchanged. Only the certificate policy moved.


Full detail: #11