The cross-subdomain cookie example exposes session credentials to matching subdomains
Source references: 1The example enables cookies for .example.com and explicitly includes session_token and session_data. Domain cookies are sent with matching subdomain requests; HttpOnly does not stop a compromised subdomain server from receiving cookies in those requests.
A subdomain that is not fully trusted or is taken over may receive session cookies, potentially exposing or enabling misuse of user sessions.
The stated cookie-scope consequence is technically possible, but the source presents this as an optional cross-subdomain authentication-sharing configuration and immediately says to enable it only when sharing is needed and every subdomain is trusted. It is therefore not a hidden exfiltration instruction, but a feature example with an important boundary warning. Residual risk depends on whether all current and future subdomains truly remain trusted; users can ask for explicit discussion of subdomain takeover and compromised-subdomain impact.
This assessment concerns the code and conditions shown, not proof that harm has occurred.### Cross-Subdomain Cookies```tsadvanced: { crossSubDomainCookies: { enabled: true, domain: ".example.com", // Note the leading dot additionalCookies: ["session_token", "session_data"], },}```Only enable if you need authentication sharing and trust all subdomains.