Skip to main content

CVE-2022-24823: CWE-668: Exposure of Resource to Wrong Sphere in netty netty

Medium
Published: Fri May 06 2022 (05/06/2022, 12:05:11 UTC)
Source: CVE
Vendor/Project: netty
Product: netty

Description

Netty is an open-source, asynchronous event-driven network application framework. The package `io.netty:netty-codec-http` prior to version 4.1.77.Final contains an insufficient fix for CVE-2021-21290. When Netty's multipart decoders are used local information disclosure can occur via the local system temporary directory if temporary storing uploads on the disk is enabled. This only impacts applications running on Java version 6 and lower. Additionally, this vulnerability impacts code running on Unix-like systems, and very old versions of Mac OSX and Windows as they all share the system temporary directory between all users. Version 4.1.77.Final contains a patch for this vulnerability. As a workaround, specify one's own `java.io.tmpdir` when starting the JVM or use DefaultHttpDataFactory.setBaseDir(...) to set the directory to something that is only readable by the current user.

AI-Powered Analysis

AILast updated: 06/22/2025, 01:51:03 UTC

Technical Analysis

CVE-2022-24823 is a medium-severity vulnerability affecting the Netty framework, specifically the io.netty:netty-codec-http package versions up to 4.1.76.Final. Netty is a widely used open-source asynchronous event-driven network application framework for Java. This vulnerability arises from an insufficient fix for a previous issue (CVE-2021-21290) related to multipart decoders handling file uploads. When applications use Netty's multipart decoders with temporary file storage enabled on disk, sensitive local information can be exposed via the system's temporary directory. The root cause is that temporary files are created in a shared system temporary directory with insecure permissions, allowing unauthorized users on the same system to access these files. This issue specifically impacts applications running on Java 6 or earlier and on Unix-like systems, including very old versions of macOS and Windows, where the system temporary directory is shared among all users. The vulnerability is mitigated in Netty version 4.1.77.Final by properly isolating temporary file storage. Workarounds include specifying a custom java.io.tmpdir JVM parameter or using DefaultHttpDataFactory.setBaseDir(...) to set a directory with restricted access, ensuring temporary files are only readable by the current user. There are no known exploits in the wild, and the vulnerability primarily concerns confidentiality due to potential local information disclosure. Exploitation requires local access to the system and is limited to environments running outdated Java versions and operating systems with shared temporary directories.

Potential Impact

For European organizations, the impact of CVE-2022-24823 is primarily related to the confidentiality of sensitive data processed by applications using vulnerable Netty versions on legacy Java and operating system environments. If exploited, unauthorized local users could access temporary files containing sensitive upload data, potentially leading to data leakage. This could affect sectors handling sensitive personal or business data, such as finance, healthcare, and government institutions, especially those maintaining legacy systems. However, the vulnerability does not affect newer Java versions (post Java 6) or modern operating systems with isolated temporary directories, limiting its scope. The impact on integrity and availability is minimal, as the vulnerability does not enable modification or disruption of services. Given the requirement for local access and outdated environments, the risk is moderate but should not be overlooked in organizations with legacy infrastructure or those running older Java applications.

Mitigation Recommendations

European organizations should prioritize upgrading Netty to version 4.1.77.Final or later to fully remediate this vulnerability. For environments where immediate upgrade is not feasible, configure the JVM to use a custom temporary directory by setting the java.io.tmpdir system property to a directory with restricted permissions accessible only to the application user. Alternatively, use Netty's DefaultHttpDataFactory.setBaseDir(...) method to specify a secure base directory for temporary file storage. Organizations should audit their Java runtime versions and operating systems to identify systems running Java 6 or earlier and legacy Unix-like or Windows versions with shared temporary directories. Where legacy systems are unavoidable, implement strict access controls and monitoring on temporary directories to detect unauthorized access attempts. Additionally, review application configurations to disable disk-based temporary storage for multipart uploads if possible, opting for in-memory processing to reduce exposure. Regularly review and update security policies to phase out unsupported Java versions and operating systems, reducing the attack surface for such vulnerabilities.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-02-10T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9848c4522896dcbf6498

Added to database: 5/21/2025, 9:09:28 AM

Last enriched: 6/22/2025, 1:51:03 AM

Last updated: 8/10/2025, 4:58:21 PM

Views: 8

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats