/

CVE-2026-14265

Severity:

HIGH RISK

(7.5)

Java Deserialization (CWE-502) in AWS JDBC Wrapper Cache

CVE-2026-14265

Analyzed

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Remote Code Execution

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A Java deserialization flaw in the RemoteQueryCachePlugin of the AWS Advanced JDBC Wrapper allows untrusted serialized objects from a shared cache to be processed without class filtering.

If an attacker can write crafted entries to the shared Redis or Valkey cache, they might execute arbitrary code on application servers that read and deserialize cached query results.

Affected context

This vulnerability appears in Java applications using the AWS Advanced JDBC Wrapper RemoteQueryCachePlugin with a shared cache backend such as Redis or Valkey.

It becomes relevant when application servers deserialize cached query results originating from infrastructure that may be writable by other services, tenants, or users.

Environments where cache isolation is weak or where cache poisoning is possible are particularly exposed, especially if multiple applications or trust domains share the same cache.

Exploit preconditions

  • Attack surface: Application servers running Java and using AWS Advanced JDBC Wrapper with RemoteQueryCachePlugin enabled.
  • Required access: Ability to write or modify serialized cache entries in the shared Redis or Valkey infrastructure (e.g., via another service, tenant, or misconfigured credentials).
  • Trigger point: Application server reads a poisoned cache entry and invokes ObjectInputStream on the attacker-controlled serialized data.
  • Why exploitation is possible: The plugin uses ObjectInputStream without class filtering or type constraints, so arbitrary gadget classes already on the classpath may be instantiated and executed during deserialization.

Why this happens

The core issue is the deserialization of untrusted data using Java's ObjectInputStream without applying any form of class filtering or type restriction.

This aligns with CWE-502: Deserialization of Untrusted Data, where attacker-controlled serialized objects are treated as trusted and rehydrated into live objects.

Because ObjectInputStream can trigger method invocations and initialization logic during object reconstruction, an attacker who can inject or modify serialized data in the cache can leverage existing gadget chains in the application's classpath to achieve arbitrary code execution.

The vulnerable pattern is the use of generic, unrestricted Java deserialization on data that originates from a shared, potentially multi-tenant cache rather than a strictly controlled, authenticated channel.

Potential impact

  • Attackers may execute arbitrary code in the context of the vulnerable application server.
  • Compromise of sensitive data handled by the affected JVM process, including database credentials or business data.
  • Lateral movement within the application environment or broader infrastructure using the compromised server as a foothold.
  • Tampering with query results or application behavior by manipulating cached responses.
  • Denial of service via crafted payloads that crash the JVM or exhaust server resources during deserialization.

General mitigation guidance

Effective mitigation focuses on eliminating unsafe deserialization and reducing trust in shared cache data:

  • Replace native Java serialization with safer, data-only serialization formats (e.g., JSON, protocol buffers) that do not execute code during parsing.
  • Introduce strict class filtering or whitelisting for any remaining deserialization logic, ensuring only a narrow set of benign, value-type classes can be reconstructed.
  • Treat cache data as untrusted input: apply validation, integrity checks, and schema enforcement before use.
  • Isolate shared cache infrastructure by tenant, application, or trust boundary to prevent untrusted writers from influencing cached objects read by sensitive services.
  • Run application servers with least-privilege OS and network permissions so that, even if deserialization is abused, the blast radius of code execution is constrained.

How teams detect issues like this

Organizations can look for this class of issue through a combination of code-centric and infrastructure-centric approaches:

  • Static analysis rules that flag uses of ObjectInputStream, readObject, or similar APIs on data originating from external stores like Redis or message queues, especially when no ObjectInputFilter or allowlist is present.
  • Code reviews focused on caching and messaging layers, highlighting any use of Java serialization across process or trust boundaries.
  • Runtime application security monitoring that detects anomalous deserialization behavior, unexpected gadget class loading, or unusual reflective calls during cache access.
  • Infrastructure-level monitoring of shared cache instances for unexpected writers, unusual key patterns, or serialized payloads where only primitive or structured data was expected.
  • Policy enforcement in CI/CD pipelines that disallows new usages of native Java serialization for cross-component communication without explicit security review.

Sources

SourceLink
aws.amazon.comaws.amazon.com/security/security-bulletins/2026-051-aws/
github.comgithub.com/aws/aws-advanced-jdbc-wrapper/releases/tag/4.0.1
github.comgithub.com/aws/aws-advanced-jdbc-wrapper/security/advisories/GHSA-c5q4-97jw-jggh

Frequently asked

questions

It can be, depending on the deployment. If an attacker can reach and write to the shared Redis or Valkey cache over the network, and the application later deserializes those entries, then remote exploitation is possible even without direct access to the application server.

The attacker needs the ability to create or modify cache entries that the RemoteQueryCachePlugin will read. This might come from compromised cache credentials, another vulnerable service sharing the same cache, or misconfigured multi-tenant infrastructure.

The most robust pattern is to avoid native Java serialization for data that crosses process or trust boundaries. Use data-only serialization formats and enforce strict schemas, or, if Java deserialization must remain, enforce narrow class allowlists and apply ObjectInputFilters everywhere serialized data is consumed.

Architect systems under the assumption that caches, queues, and other shared infrastructure are untrusted. Prohibit generic deserialization of objects from these sources, standardize on safer serialization frameworks, and include automated checks in development pipelines that flag high-risk APIs like ObjectInputStream for manual review.

Find out what's already
exploitable in your codebase.