A redirect changes the request destination
Applications often follow redirects to reach a canonical URL or a moved API. If a request includes credentials, the destination becomes a security decision. Bugs in client libraries can also retain authentication state across origins.
curl CVE-2026-94265 involved Negotiate authentication during a redirect. Other curl issues in the 8.23.0 release affected credentials and connection reuse. Use the individual advisories to match the conditions to the client and authentication mode in your application.
Set a clear origin policy
Use a fixed list of trusted API origins. Avoid allowing user-controlled URLs to make authenticated requests. Decide whether redirects are needed; if they are, check the new scheme, hostname and port before resending sensitive headers.
Do not use broad cross-origin credential options without a documented reason. Avoid putting secrets in URLs and prevent URL values from entering logs.
Update the library and test redirects
Keep curl and libcurl on a supported version. Test redirects to the same origin, a different origin and a downgraded scheme in a controlled environment. Confirm that cookies, tokens, proxy credentials and Negotiate tickets stay within the intended boundary.
Review server-side logs for unexpected authenticated requests. Rotate credentials if the application may have sent them to an untrusted destination.
