VYPR
Moderate severityNVD Advisory· Published May 6, 2022· Updated Apr 22, 2025

Local Information Disclosure Vulnerability in io.netty:netty-codec-http

CVE-2022-24823

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.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
io.netty:netty-codec-httpMaven
< 4.1.77.Final4.1.77.Final

Affected products

1

Patches

1
185f8b2756a3

Merge pull request from GHSA-269q-hmxg-m83q

https://github.com/netty/nettyNorman MaurerMay 6, 2022via ghsa
1 file changed · +11 4
  • common/src/main/java/io/netty/util/internal/PlatformDependent.java+11 4 modified
    @@ -1447,13 +1447,20 @@ public static File createTempFile(String prefix, String suffix, File directory)
                 }
                 return Files.createTempFile(directory.toPath(), prefix, suffix).toFile();
             }
    +        final File file;
             if (directory == null) {
    -            return File.createTempFile(prefix, suffix);
    +            file = File.createTempFile(prefix, suffix);
    +        } else {
    +            file = File.createTempFile(prefix, suffix, directory);
             }
    -        File file = File.createTempFile(prefix, suffix, directory);
    +
             // Try to adjust the perms, if this fails there is not much else we can do...
    -        file.setReadable(false, false);
    -        file.setReadable(true, true);
    +        if (!file.setReadable(false, false)) {
    +            throw new IOException("Failed to set permissions on temporary file " + file);
    +        }
    +        if (!file.setReadable(true, true)) {
    +            throw new IOException("Failed to set permissions on temporary file " + file);
    +        }
             return file;
         }
     
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.