Aug 3, 2026·5 min read·209 visits
Improper query parameter serialization in Angular's HttpTransferCache yields identical cache keys for semantically different requests, allowing remote attackers to poison application states during SSR hydration.
An in-depth technical analysis of CVE-2026-68945, a high-severity security vulnerability in Angular's `@angular/common/http` package. The flaw stems from an ambiguity in how query parameters are serialized to generate cache keys during Server-Side Rendering (SSR) within the `HttpTransferCache` component. By failing to encode delimiters and implicitly coercing arrays to comma-joined strings, the serialization mechanism yields identical cache keys for distinct requests, facilitating State Poisoning and Cross-Request Response Reuse.
Angular applications employing Server-Side Rendering (SSR) often utilize the HttpTransferCache component inside the @angular/common/http package. This component serves as a performance optimization. When rendering a page on the server, the application serializes HTTP request-response pairs and embeds them in the HTML document. This metadata is transferred to the client, preventing duplicate HTTP requests during browser-side application hydration.
To identify and retrieve cached responses, the client-side hydration engine generates a deterministic cache key for each outgoing request. This key must uniquely represent the requested endpoint, including all associated query parameters. If the system generates the same cache key for two semantically distinct HTTP requests, the cache-key collision causes the client to reuse incorrect server-rendered data.
CVE-2026-68945 defines a critical flaw in this key-generation logic. The implementation in @angular/common/http allowed an unauthenticated remote attacker to generate colliding cache keys by structuring query parameters with specific delimiters or comma-separated arrays. This design flaw leads directly to Cross-Request Response Reuse and client-side State Poisoning.
The root cause of this vulnerability lies in the manual string serialization logic located within sortAndConcatParams in packages/common/http/src/transfer_cache.ts. Prior to the patch, the function mapped over the query parameter keys, sorted them, and converted key-value pairs into a string using the following logic:
${k}=${params.getAll(k)}
This implementation introduced two fundamental vulnerabilities. First, the logic relied on implicit array-to-string coercion. In JavaScript and TypeScript, interpolating an array (returned by params.getAll(k)) into a template string implicitly invokes Array.prototype.toString(). This joins the array elements with commas without escaping individual values. For example, a single scalar parameter containing a comma (?role=user,admin) produces the serialized output role=user,admin. Concurrently, a repeated parameter containing distinct values (?role=user&role=admin) returns ['user', 'admin'] from getAll, which also coerces to the identical output role=user,admin.
Second, the serialization logic failed to URL-encode the keys and values. Because ampersands (&) and equals signs (=) were not percent-encoded, an attacker could perform delimiter injection. A parameter key-value pair of a=1&b=2 would generate the serialized string fragment a=1&b=2. This output matches the serialization of a legitimate request with two discrete query parameters: a=1 and b=2.
The original, vulnerable implementation of the serialization helper function, along with the corrected logic introduced in the patch, highlights the shift from custom serialization to native standard APIs.
// VULNERABLE CODE PATH
function sortAndConcatParams(params: HttpParams | URLSearchParams): string {
return [...params.keys()]
.sort()
// params.getAll(k) returns string[], coerced via toString() to comma-separated values
.map((k) => `${k}=${params.getAll(k)}`)
.join('&');
}In the vulnerable scenario, sortAndConcatParams does not utilize safety utilities to sanitise characters like ,, &, or =. This allows structural manipulation of the serialized key structure.
// PATCHED CODE PATH
function sortAndConcatParams(params: HttpParams | URLSearchParams): string {
const searchParams = new URLSearchParams(
params instanceof URLSearchParams ? params : params.toString(),
);
searchParams.sort();
return searchParams.toString();
}The patch replaces the custom concatenation loop entirely. By instantiating a platform-native URLSearchParams object and sorting it via the native sort() method, Angular ensures that query parameter delimiters are correctly processed. The standard toString() method of URLSearchParams applies percent-encoding to commas, ampersands, and equal signs. Consequently, ?role=user,admin correctly serializes to role=user%2Cadmin, whereas ?role=user&role=admin serializes to role=user&role=admin, eliminating the key ambiguity.
Exploiting this flaw requires an Angular application that dynamically loads data during SSR based on query parameter input. An attacker targets the SSR engine to populate the cache with a crafted payload, which a victim subsequently retrieves via a normal application flow.
An attacker initiates a request to the application using a comma-separated format designed to mimic a multi-parameter administrative state. The SSR server processes the request and places a low-privilege or spoofed response in the cache with the serialized key role=user,admin. When a legitimate user loads the application using repeated parameters, the client-side hydration engine computes the cache key, gets a hit on the colliding entry, and hydrates the application with the attacker's cached state rather than performing a fresh backend API query.
The impact of CVE-2026-68945 is categorized as client-side State Poisoning and Cross-Request Response Reuse. If an application uses query parameters to determine authorization states, user contexts, or display content during SSR, this vulnerability can lead to security bypasses. An attacker can seed the server-side cache with unauthorized content that is subsequently presented to legitimate users.
In scenarios where the client relies on hydrated server responses to set user access levels or transaction details, the application's integrity is compromised. Because exploitation requires no authentication and can be performed remotely via standard network channels, the threat complexity is low. While it does not enable arbitrary server-side code execution, the high confidentiality impact and risk of data manipulation warrant the assigned CVSS score of 8.8.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
@angular/common Angular | < 20.3.27 | 20.3.27 |
@angular/common Angular | >= 21.0.0-next.0, < 21.2.19 | 21.2.19 |
@angular/common Angular | >= 22.0.0-next.0, < 22.0.2 | 22.0.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-345 |
| Attack Vector | Network |
| CVSS Score | 8.8 |
| Exploit Status | Proof-of-Concept |
| Impact | State Poisoning / Cross-Request Response Reuse |
| KEV Status | Not Listed |
The application does not sufficiently verify that the received data matches the semantic intent of the client-side request.
CVE-2026-28385 (GHSA-3gq2-x4qg-p4g6) is a Server-Side Request Forgery (SSRF) vulnerability in Canonical LXD versions 4.12 through 6.9. An authenticated user possessing the can_create_images entitlement can force the LXD daemon to execute arbitrary outbound HTTP and HTTPS requests via the /1.0/images API endpoint. Due to the absence of egress destination validation, an attacker can probe host loopback services, RFC 1918 private network segments, and cloud Instance Metadata Services (IMDS) from the network position of the privileged LXD daemon.
Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.
CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.
GHSA-fmc8-p6q7-75cc (associated with CVE-2026-48755) is a critical argument injection vulnerability in Canonical LXD (github.com/canonical/lxd). The vulnerability occurs during instance and storage volume backup operations when processing the user-supplied compression_algorithm configuration parameter. While LXD validates the primary executable token against an allowlist of supported compression binaries, it fails to sanitize or restrict subsequent tokens parsed via shellquote.Split. These additional arguments are passed directly to exec.Command. An authenticated attacker with privileges to trigger backups can inject command-line flags for utilities like zstd to read staged files from a container filesystem and write them to arbitrary paths on the underlying host filesystem, such as /etc/cron.d/, achieving root-level arbitrary code execution on the host.
A critical path traversal vulnerability caused by improper input validation (CWE-20) exists in the direct image download handler of Canonical LXD and Linux Containers Incus. When an authenticated user requests an image import using the URL source type, the daemon reads the image fingerprint from an untrusted HTTP response header (`Incus-Image-Hash` or `LXD-Image-Hash`) without validating that it conforms to a SHA-256 format. This unvalidated string is concatenated directly into a filesystem path via `filepath.Join` prior to file creation and cryptographic verification, allowing directory traversal sequences to write arbitrary files on the host filesystem as root.
CVE-2026-9639 (GHSA-j93m-3j9p-m5m8) is a null pointer dereference vulnerability in Canonical LXD affecting versions 5.0.0 through 5.21.4 and 6.0 through 6.8. The flaw resides in the (*lxdBackend).CreateCustomVolumeFromBackup method within lxd/storage/backend_lxd.go. An authenticated attacker with the can_create_storage_volumes permission can upload a crafted custom volume backup tarball that omits the expires_at field on a snapshot entry, triggering an unhandled SIGSEGV panic and terminating the LXD daemon.