Custom headers from settings are validated before entering the environment.
What's wrong with this entry?
A ANTHROPIC_CUSTOM_HEADERS value supplied through settings used to be copied into the process environment unchecked. It now has to pass a validation step first, closing a path where settings could inject arbitrary header material.
- Rejects bare carriage-return line endings and any header line whose value looks like a redirect payload.
- Rejects header names matching a broad sensitive-key pattern covering auth, key, token, cookie, secret, credential, session, signature, passw and jwt.
- Always enforced; this removes a previous bypass rather than adding an opt-in.
ANTHROPIC_CUSTOM_HEADERS
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.227
Auth failures now name the credential source
Both mention custom header
-
v2.1.227
Auth token and custom header failures now say which value is wrong
Both mention custom header
-
v2.1.227
Bad HTTP header values are rejected before the request instead of crashing
Both mention custom header