@angular/common
Affected
- introduced
22.0.0, fixed22.1.1(semver)
Fixed versions
22.1.1
Fix
- Fixed version
22.1.1npm install @angular/[email protected]
Advisory
Also known as: CVE-2026-88059
Angular: Information Leak via HttpTransferCache Bypass When Using withRequestsMadeViaParent
A security bypass vulnerability was discovered in @angular/common when Server-Side Rendering (SSR) and hydration are enabled in applications using a hierarchical HttpClient configuration with withRequestsMadeViaParent().
The HttpTransferCache utility optimizes hydration by caching outgoing HTTP requests performed during SSR and transferring the cached state to the client-side application via TransferState (serialized as JSON in <script id="ng-state">). Following the remediation of CVE-2026-50170, HttpTransferCache automatically skips caching requests that contain authentication headers or credentials (Authorization, Cookie, withCredentials, etc.).
However, when a child HttpClient delegates to a parent client via withRequestsMadeViaParent(), the child's TransferCache interceptor evaluates whether the request is eligible for caching before delegating to the parent client's interceptor chain.
If an outgoing request originates as anonymous from the child client, the child TransferCache marks the request as cacheable. When the request reaches a parent interceptor that injects sensitive authentication credentials (such as an Authorization header or API token), the parent TransferCache correctly skips caching the authenticated request. However, when the backend returns the private, authenticated response, the child TransferCache still stores the response in TransferState based on its initial pre-delegation evaluation.
Impact
Successful exploitation allows sensitive, user-specific information belonging to an authenticated user to be leaked to unauthenticated or unauthorized users. This occurs when:
HttpClient initiates an unauthenticated request that is subsequently authenticated by a parent interceptor.TransferState).Attack Preconditions & Vulnerable Configurations
An application is affected only if all of the following conditions are met:
provideClientHydration()).HttpClient using withRequestsMadeViaParent().Authorization headers, session cookies, or custom API tokens filtered via withHttpTransferCacheOptions) are attached by an interceptor in the parent injector chain rather than on the initial child request.Vulnerable Code Pattern Example
// Parent Injector / Application Config
export const appConfig: ApplicationConfig = {
providers: [
provideHttpClient(
// Parent interceptor attaches sensitive Authorization header
withInterceptors([
(req, next) => next(req.clone({ setHeaders: { Authorization: `Bearer ${getToken()}` } }))
])
),
],
};
// Child Injector / Feature or Component Config
const childClient = createEnvironmentInjector(
[
// Child delegates to parent; TransferCache evaluates req BEFORE parent auth interceptor runs
provideHttpClient(withRequestsMadeViaParent()),
],
parentInjector
).get(HttpClient);
// Request originates without auth headers -> marked cacheable by child TransferCache
childClient.get('/api/user/profile').subscribe();
Patches
The issue is resolved by updating @angular/common to run root interceptors in the terminal request chain so that delegated clients leave inherited root interceptors to the parent chain, preventing duplicate execution and ensuring HttpTransferCache evaluates cache eligibility after parent request interceptors run.
22.1.121.2.2020.3.28Workarounds & Mitigations
For applications that cannot immediately upgrade to a patched version, use one of the following mitigations:
Authorization) are attached directly when constructing the request or via an interceptor configured directly on the child HttpClient, rather than relying solely on parent interceptors.withHttpTransferCacheOptions with a filter on the child client that explicitly excludes endpoints returning user-specific or sensitive data: provideClientHydration(
withHttpTransferCacheOptions({
filter: (req) => !req.url.includes('/api/private/'),
})
)
Cache-Control: no-store / private headers at your edge/CDN layer so personalized HTML is never shared.Medium Basis: The source's own band: MODERATE
22.0.0, fixed 22.1.1 (semver)22.1.1
22.1.1npm install @angular/[email protected]21.0.0, fixed 21.2.20 (semver)21.2.20
21.2.20npm install @angular/[email protected]20.0.0, fixed 20.3.28 (semver)20.3.28
20.3.28npm install @angular/[email protected]0, last affected 19.2.25 (semver)None listed
No fixed version is listed.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0