Please report security issues privately through GitHub Security Advisories rather than opening a public issue. Include a minimal reproduction, affected crate version, target architecture, and feature set where possible.
Security fixes are released on the latest 2.x minor release line.
In scope:
- Memory safety issues, undefined behavior, out-of-bounds reads or writes, or integer overflows across any supported architecture, CPU feature level, or feature combination.
- Violations of documented input validation or destination-preservation contracts (for example accepting malformed hex or modifying destination bytes on error in slice conversions).
Out of scope (explicit non-goals):
- Constant-time execution:
faster-hexis a throughput-oriented codec. Scalar and short-input paths use data-dependent lookup tables, and checked decoders/validators return early on the first failing block. Do not use it where cache-timing or branch-timing side channels on secret keys or tokens are part of your threat model; use a dedicated constant-time codec (such asct-codecs) instead. - Automatic memory zeroization: stack buffers used by formatting and Serde
adapters, as well as spare
Veccapacity touched before an error inhex_decode_appendor owned decoders, are not zeroized. - Unbounded allocation from untrusted input: allocating helpers
(
hex_decode_vec,hex_decode_append, Serde adapters) reserve decoded output storage based on the input length before character validation. In addition,deserialize_boundedonly limits the decoded output length; for escaped JSON or streaming inputs, the underlying Serde deserializer may still allocate the entire input string beforefaster-hexchecks the bound. Enforce raw input size limits at the transport or parser boundary first, then usedeserialize_bounded(or caller-owned slices) to cap decoded output allocation.