The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2022-31159

CVE-2022-31159: AWS SDK Java Path Traversal Vulnerability

CVE-2022-31159 is a path traversal flaw in AWS SDK for Java's S3 TransferManager that allows attackers to write files outside intended directories. This post covers technical details, affected versions, and mitigation.

Published: February 18, 2026

CVE-2022-31159 Overview

A partial path traversal vulnerability exists in the AWS SDK for Java v1 prior to version 1.12.261. The vulnerability resides within the downloadDirectory method of the AWS S3 TransferManager component, allowing attackers to bypass directory traversal validation and write files outside of the intended destination directory under specific conditions.

Critical Impact

Applications using the vulnerable TransferManager::downloadDirectory method to download untrusted S3 bucket contents could have files written outside the intended destination directory, potentially leading to unauthorized data access or file system manipulation.

Affected Products

  • Amazon AWS SDK for Java versions prior to 1.12.261

Discovery Timeline

  • 2022-07-15 - CVE-2022-31159 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2022-31159

Vulnerability Analysis

This vulnerability is classified as a partial-path traversal issue (CWE-22) affecting the S3 object download functionality in the AWS SDK for Java. The vulnerability exists because while applications control the destinationDirectory argument when calling downloadDirectory, the S3 object keys are determined by whoever uploaded the objects to the bucket. A flaw in the validation logic allows specially crafted object keys containing UNIX double-dot (..) sequences to partially escape the intended destination directory.

The scope of this vulnerability is limited but significant. For a destination directory like /tmp/foo, an attacker could potentially cause downloads to /tmp/foo-bar, but not to an entirely different path like /tmp/bar. This constraint limits exploitation to directories whose name prefix matches the configured destination directory.

Root Cause

The root cause lies in insufficient validation of S3 object key names within the downloadDirectory method. The validation logic intended to prevent directory traversal attacks contained a flaw that allowed UNIX double-dot (..) sequences to bypass the security checks. When S3 object keys containing these sequences are processed, the resulting filesystem path can resolve to a location one level up from the intended working directory.

Attack Vector

An attacker with the ability to upload objects to an S3 bucket that is subsequently downloaded using the vulnerable TransferManager::downloadDirectory method can exploit this vulnerability. The attack requires:

  1. Access to upload objects with malicious key names to an S3 bucket
  2. A victim application using AWS SDK for Java v1 prior to 1.12.261
  3. The victim application calling downloadDirectory on the attacker-controlled bucket
  4. A filesystem structure where the destination directory prefix matches an unintended target directory

The vulnerability is exploited by crafting S3 object keys that include .. path traversal sequences. When the SDK processes these keys during download, the validation bypass allows files to be written to directories that share a prefix with the intended destination.

Detection Methods for CVE-2022-31159

Indicators of Compromise

  • Unexpected files appearing in directories that share a prefix with application download destinations
  • S3 object keys in CloudTrail logs containing .. path traversal sequences
  • Files downloaded from S3 appearing outside expected destination directories
  • Application logs showing downloads to unexpected filesystem paths

Detection Strategies

  • Audit application dependencies to identify AWS SDK for Java versions below 1.12.261
  • Review CloudTrail logs for S3 GetObject operations with suspicious object key patterns
  • Monitor filesystem activity for file creation in directories adjacent to S3 download destinations
  • Implement runtime monitoring for path traversal patterns in S3 object metadata

Monitoring Recommendations

  • Enable detailed logging for S3 TransferManager operations in applications
  • Configure file integrity monitoring on directories adjacent to S3 download destinations
  • Set up alerts for S3 bucket access patterns involving object keys with special characters
  • Review application error logs for path-related exceptions during S3 downloads

How to Mitigate CVE-2022-31159

Immediate Actions Required

  • Upgrade AWS SDK for Java to version 1.12.261 or later immediately
  • Audit all applications using TransferManager::downloadDirectory to identify vulnerable deployments
  • Review S3 bucket contents for objects with suspicious key names containing .. sequences
  • Implement additional validation of S3 object keys before download operations

Patch Information

Amazon has addressed this vulnerability in AWS SDK for Java version 1.12.261. Organizations should update their dependencies to this version or later. For detailed information about the fix, refer to the GitHub Security Advisory.

Workarounds

  • When calling TransferManager::downloadDirectory, pass a KeyFilter that rejects S3ObjectSummary objects where getKey() returns a string containing the substring ..
  • Implement application-level validation of S3 object keys before initiating downloads
  • Restrict S3 bucket policies to only allow trusted principals to upload objects
  • Use separate, isolated destination directories with unique prefixes for each download operation
java
// Workaround: Implement KeyFilter to block path traversal attempts
TransferManager transferManager = TransferManagerBuilder.standard().build();

KeyFilter safeKeyFilter = new KeyFilter() {
    @Override
    public boolean shouldInclude(S3ObjectSummary objectSummary) {
        return !objectSummary.getKey().contains("..");
    }
};

transferManager.downloadDirectory(bucketName, prefix, destinationDir, safeKeyFilter);

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechAws Sdk Java

  • SeverityMEDIUM

  • CVSS Score6.5

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-22
  • Technical References
  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2026-35467: Browser API Key Information Disclosure

  • CVE-2026-35466: cveInterface.js XSS Vulnerability

  • CVE-2026-30252: ZenShare Suite XSS Vulnerability

  • CVE-2026-30251: ZenShare Suite v17.0 XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English