# RUSTSEC-2026-0174: `Authorization::value` and `WwwAuthenticate::value` can violate ASCII invariants

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-03-11T12:00:00.000Z
- Modified: 2026-06-08T16:30:03.596Z

## Description

`Authorization::value` uses `HeaderValue::value` with the claim
that the internal string is ASCII, but `Authorization::new` and
`Authorization::set_credentials` accept arbitrary `String` credentials without
validation. As a result, safe code can construct a header value containing
non-ASCII UTF-8 while the implementation assumes ASCII.

`WwwAuthenticate::new` and `WwwAuthenticate::set_realm` similarly accepts arbitrary `String` input, so `WwwAuthenticate::value` can also produce a header value that violates the crate’s documented ASCII invariants. 

This issue has not been confirmed as Undefined Behavior, but the unsafe
justification in `Authorization::value` and `WwwAuthenticate::value` appears incorrect and can produce values outside the expected ASCII-only constraints.

The http-types crate is unmaintained and the issue is unlikely to be fixed.

(As written by RustSec Advisory Database.)

## Affected

- http-types (crates.io): from 0.0.0-0

## References

- <https://crates.io/crates/http-types> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0174.html> (advisory)
- <https://github.com/http-rs/http-types/issues/534> (report)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0174](https://rustsec.org/advisories/RUSTSEC-2026-0174.html), CC0-1.0, modified 2026-06-08

---

Page: https://cve.day/RUSTSEC-2026-0174 · Whole record: https://cve.day/RUSTSEC-2026-0174.json · Rebuilt by cve.day 2026-11-25T22:56:43.369Z
