CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-443W-3RQ3-5M5H

GHSA-443w-3rq3-5m5h: Policy Injection via Improper Input Escaping in AWS SDK for Java v2 CloudFront Utilities

Amit Schendel
Amit Schendel
Senior Security Researcher

Mar 27, 2026·7 min read·29 visits

Executive Summary (TL;DR)

Improper escaping of double quotes in the AWS SDK for Java v2 CloudFront utilities allows attackers to inject arbitrary JSON conditions into signed URL policies, enabling authorization bypass.

The AWS SDK for Java v2 (versions 2.18.33 through 2.41.29) contains a vulnerability within the CloudFront utilities module. Improper neutralization of special characters allows attackers to manipulate JSON policy documents, potentially granting unauthorized access to CloudFront-protected resources by bypassing intended constraints.

Vulnerability Overview

The AWS SDK for Java v2 includes a dedicated module (software.amazon.awssdk:cloudfront) designed to simplify interactions with Amazon CloudFront. A core feature of this module is the generation of signed URLs and signed cookies, which enforce access control on private content delivered via the CDN. These signatures rely on a JSON-formatted Policy Document that specifies the precise conditions under which access is granted, such as allowed IP ranges, target resources, and expiration timestamps.

Versions of the SDK prior to 2.41.30 contain a flaw in the CloudFrontUtilities class related to the construction of these Policy Documents. The implementation fails to properly sanitize or escape specific control characters, most notably double quotes (") and backslashes (\), before embedding them into the JSON structure. This weakness maps to CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component) and CWE-707 (Improper Neutralization).

When an application passes unsanitized, user-controllable input into the SDK's signing methods, the absence of output encoding allows the input to alter the structure of the resulting JSON document. This structural alteration permits an attacker to inject additional JSON keys and values, fundamentally modifying the constraints established by the application. The resulting signature is mathematically valid but cryptographically secures a policy that differs from the application's intent.

Technical Root Cause Analysis

The vulnerability stems from the direct string concatenation or insufficient tokenization logic used within CloudFrontUtilities.java to build the policy JSON. When invoking methods such as getSignedUrlWithCustomPolicy or getSignedCookieWithCustomPolicy, the SDK accepts various input parameters, including the Resource path and IPAddress constraints. The SDK then formats these inputs into a strict JSON schema required by the AWS CloudFront service.

In the vulnerable versions, the serialization process inserts the string values provided by the user directly into the JSON string templates without applying JSON string escaping rules. A standard JSON string requires that internal double quotes be escaped as \". Because the SDK omits this escaping phase, an input containing a raw double quote will prematurely close the string value being evaluated by the JSON parser.

Following the premature string termination, any subsequent characters in the user's input are parsed as structural JSON elements (keys, objects, arrays, or boolean/numeric values). This allows an attacker to append new top-level or nested elements to the Statement array of the CloudFront Policy Document. The resulting payload is subsequently signed using the AWS cryptographic key, yielding a valid signature for the maliciously modified policy.

Code Analysis and Remediation

To understand the mechanics of the flaw, it is necessary to examine the expected JSON structure of a CloudFront custom policy. A standard policy specifies a Statement array containing objects that define the Resource and various Condition blocks. The Resource value is typically a string representing the URL path.

{
  "Statement": [
    {
      "Resource": "https://d111111abcdef8.cloudfront.net/video.mp4",
      "Condition": {
        "DateLessThan": {"AWS:EpochTime": 1600000000}
      }
    }
  ]
}

In the unpatched SDK, if an application constructs the Resource parameter dynamically using user input (e.g., https://d111111abcdef8.cloudfront.net/ + userInput), a malicious userInput can break the JSON syntax. The patch introduced in version 2.41.30 addresses this by applying strict character escaping to inputs before they are serialized into the JSON structure.

The patched implementation actively scans input strings for characters that hold syntactic meaning in JSON (", \, and control characters). These characters are replaced with their properly escaped equivalents (\", \\). This ensures that the entire user input is treated as a literal string value by the CloudFront JSON parser, completely neutralizing the injection vector.

Exploitation Methodology

Exploitation requires that the target application accepts user input and directly incorporates it into the parameters passed to the CloudFront signing utilities. A common scenario involves an endpoint that generates temporary download links for specific files requested by the user. If the application does not validate the requested filename, an attacker can supply a crafted payload.

Consider an application that appends user input to a base URL to form the Resource string. The attacker submits a filename containing a quote, followed by a comma, and a new JSON key-value pair. A characteristic payload resembles the following string: video.mp4", "Condition": { "DateLessThan": { "AWS:EpochTime": 2147483647 } } } //.

When the vulnerable SDK processes this payload, the resulting JSON policy document is modified. The injected quote closes the Resource string early. The injected Condition block overrides or appends to the policy conditions, setting an expiration date far into the future (e.g., the year 2038). The trailing // or similar structural characters are used to comment out or invalidate the remaining legitimate JSON structure originally intended by the SDK.

The SDK signs this manipulated JSON document and returns a signed URL to the attacker. The attacker then utilizes this signed URL to interact with CloudFront. Because the signature matches the (malicious) policy document, CloudFront grants access according to the injected conditions, effectively bypassing the application's intended temporal or network restrictions.

Impact Assessment

The vulnerability is tracked under the CVSS 4.0 vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:H/SI:N/SA:N, resulting in a base score of 4.0. While the score is mathematically categorized as Medium-Low, the practical impact depends heavily on the specific use case of the signed URLs within the affected application.

The primary consequence is a violation of Subsequent Confidentiality (SC:H). The vulnerability does not allow an attacker to read arbitrary memory from the application server or execute code. However, it entirely compromises the access control mechanism protecting the downstream CloudFront resources. An attacker can extend the validity period of a signed URL indefinitely or modify the resource path to access other files within the same CloudFront distribution.

The integrity of the policy document itself is also compromised (VI:L), as the attacker successfully manipulates the data structure generated by the application. Organizations relying on signed URLs for strict digital rights management (DRM), temporary media delivery, or IP-restricted data sharing are at highest risk, as these operational constraints can be completely bypassed by an unauthenticated attacker.

Mitigation and Detection Strategies

The primary and most effective remediation is to update the AWS SDK for Java v2 to version 2.41.30 or later. This release implements robust input escaping within the CloudFrontUtilities class, preventing the injection of structural JSON characters. Dependency management tools (e.g., Maven, Gradle) should be audited to ensure no transitive dependencies are pulling in vulnerable versions of software.amazon.awssdk:cloudfront.

For applications where immediate patching is not feasible, developers must implement strict input validation on all user-supplied data that influences the parameters of a signed URL or cookie. Input should be sanitized to reject any requests containing double quotes ("), backslashes (\), or other non-alphanumeric control characters in filename or path segments. Utilizing allow-lists for expected input patterns is highly recommended.

Security teams can detect potential exploitation attempts by analyzing Amazon CloudFront access logs. Anomalous log entries characterized by excessively long requested URIs, the presence of JSON syntax within URL parameters, or unexpected Condition blocks in the query string indicate possible attacks. Additionally, application-side logging should be configured to flag requests containing double quotes in fields designated for file paths or identifiers.

Official Patches

AWSRelease Tag 2.41.30

Technical Appendix

CVSS Score
4.0/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:H/SI:N/SA:N

Affected Systems

AWS SDK for Java v2 (software.amazon.awssdk:cloudfront module)

Affected Versions Detail

Product
Affected Versions
Fixed Version
software.amazon.awssdk:cloudfront
AWS
>= 2.18.33, <= 2.41.292.41.30
AttributeDetail
Vulnerability TypeImproper Neutralization of Special Elements (Injection)
CWE IDsCWE-74, CWE-20, CWE-707
CVSS v4 Score4.0 (Medium)
Attack VectorNetwork
Privileges RequiredNone
Subsequent ImpactHigh (Confidentiality)
Affected Packagesoftware.amazon.awssdk:cloudfront

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1566Phishing (if used to deliver signed URLs)
Initial Access
CWE-74
Improper Neutralization of Special Elements

Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Vulnerability Timeline

AWS SDK for Java v2 version 2.41.30 released with the defense-in-depth enhancement
2026-02-16
Official GitHub Security Advisory published (GHSA-443w-3rq3-5m5h)
2026-03-27
Vulnerability information synchronized with the OSV database
2026-03-27

References & Sources

  • [1]GitHub Security Advisory GHSA-443w-3rq3-5m5h
  • [2]AWS SDK for Java Security Guide
  • [3]CloudFrontUtilities.java Source Code
  • [4]Release 2.41.30 Notes

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-39829
7.5

CVE-2026-39829: Denial of Service in Go SSH Parser

A high-severity Denial of Service (DoS) vulnerability exists in the golang.org/x/crypto/ssh package prior to version 0.52.0. The vulnerability is caused by a lack of size and range validation on incoming RSA and DSA public key parameters during SSH authentication. An unauthenticated attacker can submit a crafted public key with pathologically large parameters, triggering intensive CPU computation during signature verification and leading to a complete Denial of Service.

Alon Barad
Alon Barad
3 views•5 min read
•about 3 hours ago•CVE-2026-39831
9.1

CVE-2026-39831: Authentication Bypass in golang.org/x/crypto/ssh via FIDO/U2F User Presence Bypass

An authentication bypass vulnerability was identified in the golang.org/x/crypto/ssh package. The library's verification logic for FIDO/U2F security keys failed to check the User Presence (UP) flag. This omission allows an attacker with access to a hardware token interface or an agent-forwarding socket to authenticate without physical user interaction.

Alon Barad
Alon Barad
5 views•5 min read
•about 4 hours ago•CVE-2026-39834
9.1

CVE-2026-39834: Infinite Loop and CPU Exhaustion via Integer Truncation in Go SSH Channel Write

A critical vulnerability exists in the Go SSH sub-repository (golang.org/x/crypto/ssh) before version 0.52.0. When an application writes payloads of 4GB or larger in a single write operation, integer truncation in the remote window calculation causes an infinite loop. This results in complete CPU core exhaustion and a denial-of-service condition.

Amit Schendel
Amit Schendel
6 views•7 min read
•about 6 hours ago•CVE-2026-42508
9.1

CVE-2026-42508: Bypass of SSH Certificate Authority Revocation in golang.org/x/crypto/ssh/knownhosts

An issue was discovered in Go's `golang.org/x/crypto/ssh/knownhosts` package where a revoked Certification Authority (CA) public key was not correctly checked for revocation during SSH host certificate validation. This allowed clients or servers utilizing the library to validate and trust host certificates issued by explicitly revoked CAs.

Alon Barad
Alon Barad
9 views•5 min read
•about 7 hours ago•CVE-2026-46595
10.0

CVE-2026-46595: Critical Authorization Bypass via source-address Validation Failure in golang.org/x/crypto/ssh

An authorization bypass vulnerability exists in the golang.org/x/crypto/ssh package prior to version 0.52.0. When an SSH server is configured with a custom VerifiedPublicKeyCallback that returns a Permissions object containing a source-address critical option, the server fails to validate and enforce the restriction. This allows remote clients with valid public keys to bypass IP-based access restrictions and authenticate from unauthorized network locations.

Alon Barad
Alon Barad
6 views•7 min read
•about 9 hours ago•CVE-2026-48517
7.5

CVE-2026-48517: Remote Code Execution via Typeless Deserialization Blocklist Bypass in MessagePack-CSharp

A critical vulnerability exists in MessagePack-CSharp's typeless deserialization mechanism where configured blocklists fail to recursively inspect nested types. An attacker can bypass security restrictions by wrapping unauthorized types in arrays or generic collections, allowing insecure deserialization and remote code execution.

Alon Barad
Alon Barad
6 views•7 min read