Repository navigation
Barbacane v0.12.4
Security fixes and dependency updates. Wasmtime moves to 48.0.8: on aarch64, a plugin could make the host jump to arbitrary code (RUSTSEC-2026-0379). A .bca is read once and every member is checked against its manifest before use, and the control plane checks plugin capabilities the way barbacane compile does. Auth plugins and acl keep group names containing commas whole, which changes how x-auth-consumer-groups writes , and %. response-transformer refuses a response whose fields cannot be removed, and its body pointers must start with /, so a spec that compiled under 0.12.3 can be refused: compile yours before upgrading a running gateway. The artifact format version does not change.
Security
- wasm runtime: Wasmtime is upgraded from 48.0.5 to 48.0.8. RUSTSEC-2026-0379: on aarch64, Cranelift compiled a large
br_tableso that a plugin could make the host jump to arbitrary code; thelinux/arm64images and the aarch64 binaries were exposed to any plugin they loaded. RUSTSEC-2026-0364 (exception tags left host data unaligned) and RUSTSEC-2026-0359 (stack overflow dropping a long chain of recursive GC types) concern features the gateway leaves on, exceptions and GC. The other advisories fixed by these releases are in the component model, which the gateway does not load, or needi31/nullrefarguments on host-to-guest calls, which it does not make. - TLS: rustls 0.23.46, rustls-webpki 0.103.16 and webpki-roots 1.0.11. They fix
Debugoutput exposing session secrets, unauthenticated ServerHello downgrading later connections to classical key exchange, up to 1 GiB allocated for Brotli certificate decompression before authentication, data sent to the outer server after an ECH rejection, and certificate verification accepting distrusted intermediates (RUSTSEC-2026-0346 to -0349, -0381, -0382). - tokio: 1.54.1, for
AsyncFdconstructors violating I/O safety (RUSTSEC-2026-0386). - zstd: zstd-sys 2.1.2 (RUSTSEC-2026-0410). RUSTSEC-2026-0391, -0398 and -0403, in zstd 0.13 and zstd-safe 7, are ignored in
deny.toml: rskafka and Wasmtime's cache still require zstd 0.13, and the gateway reaches none of the affected code (Kafka records are produced uncompressed and never consumed, the Wasmtime cache is off, and zstd-safe is built withoutseekable). - tests: p256 0.14 in the test crate, so crypto-bigint 0.7 replaces 0.5 (RUSTSEC-2026-0387). The gateway does not use it.
Changed
- dependencies: YAML is read and written with
yaml_serde, the YAML Organization's continuation ofserde_yaml, in place of the deprecatedserde_yaml0.9. Its parserlibyaml-rsreplacesunsafe-libyaml, which is unmaintained (RUSTSEC-2024-0449). Both are the same translation of libyaml, so documents parse as before. - artifacts: the data plane reads a
.bcaonce and checks every member (routes, specs, plugins, WAF rules) against the checksumsartifact_hashcovers before using any of it. A duplicate, unlisted or missing member is refused, and a plugin is read only fromplugins/<name>.wasmunder its recorded checksum. The compiler refuses two specs with the same file name (E1058), since the artifact stores specs by file name. - control plane: compilations read each plugin's capabilities from the manifest embedded in its WASM and mark the artifact capability-enforced, so the data plane checks control-plane builds the same way as
barbacane compilebuilds. A plugin without an embedded manifest is refused (E1041). Secret config fields from the embedded schema now produce the plaintext-secret warning (E1070) in control-plane builds too. - response-transformer: with
body.removeconfigured, a response whose body is not JSON, or aremovepointer that does not parse, is answered502(problem+json, typeurn:barbacane:error:response-transform-failed).body.allow_non_json: truepasses a body that is not JSON through unchanged, for upstreams that also return other content types. Every body pointer (addandrenamekeys,renametargets,removeitems) must start with/, so a config with one that does not fails compilation withE1023.
Fixed
- WAF: the libinjection classifiers follow libinjection 4.0.1 (
barbacane-libinjection0.1.2).@detectSQLiflags a number with an empty exponent, as in1' or 1.e(1), which MySQL ignores, and readsLIKE (after an operand as an operator rather than a function call.@detectXSSchecks attributes after a 0xFF byte, which had ended tokenizing, and uses upstream's list of 432 event-handler attributes (145 added, 11 removed). The OWASP CRS v4.9.0 regression results are unchanged. - ldap host function:
host_ldap_bindrefuses an empty password asinvalid_credentialswithout contacting the directory. A DN with an empty password is an unauthenticated bind (RFC 4513 §5.1.2), which a directory may accept without checking the DN.ldap-authalready refused it; the host now does for every plugin. - auth plugins and acl: a group name containing a comma, such as an LDAP DN or a single-group claim value, stays one group. In
x-auth-consumer-groupsandauth.groupsa name's,is written%2Cand its%is written%25, andacldecodes them, so its rules match whole group names. Names without either character are unchanged. An upstream that readsx-auth-consumer-groupsand has groups with commas must decode the two escapes. - control plane: revoking a data-plane API key ends the WebSocket sessions registered with it: each receives
disconnectand the socket closes. Sessions also recheck their key at the heartbeat interval, so an expired key, or one revoked through another control-plane instance, ends them as well. - spec endpoint:
/__barbacane/specs/{file}reads a spec with the compiler's parser, so YAML and JSON are accepted whatever the file name, and strips thex-barbacane-*extensions. A spec that cannot be parsed is answered500and logged. - mock: placeholder values are encoded for the configured
content_type: as the inside of a JSON string forapplication/jsonand+jsontypes, as HTML text for any other type.