CVE-2023-0482 in RESTEasyinfo

Summary

by MITRE • 02/18/2023

In RESTEasy the insecure File.createTempFile() is used in the DataSourceProvider, FileProvider and Mime4JWorkaround classes which creates temp files with insecure permissions that could be read by a local user.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 05/20/2025

The vulnerability identified as CVE-2023-0482 affects the RESTEasy framework, a popular Java-based RESTful web services implementation. This security flaw stems from the improper handling of temporary files within core framework components, specifically in the DataSourceProvider, FileProvider, and Mime4JWorkaround classes. The issue manifests when the framework utilizes the File.createTempFile() method without establishing appropriate security controls, creating temporary files with predictable names and insecure permission settings that expose them to unauthorized access.

The technical implementation of this vulnerability involves the insecure creation of temporary files through the Java File.createTempFile() API call, which according to CWE-377 creates temporary files with default permissions that may allow local users to read or manipulate these files. The affected classes in RESTEasy utilize this method to generate temporary storage for data processing operations, but fail to implement proper security measures such as setting restrictive file permissions or using secure temporary directory configurations. This creates a privilege escalation scenario where local users can potentially access sensitive data that was intended to be processed securely within the framework.

The operational impact of this vulnerability extends across various deployment scenarios where RESTEasy applications process user-supplied data through MIME handling or data source operations. Attackers with local access to the system can exploit this weakness to read temporary files containing potentially sensitive information, including user data, authentication tokens, or application configuration details. The vulnerability aligns with ATT&CK technique T1005 by enabling data from local systems to be accessed, and represents a classic example of insecure temporary file handling that can lead to information disclosure and potential further compromise of affected systems.

Mitigation strategies for CVE-2023-0482 should focus on immediate framework updates from the vendor to address the insecure temporary file creation patterns. Organizations should implement proper file permission controls by ensuring that temporary files are created with restrictive permissions using the File.setReadable(), File.setWritable(), and File.setExecutable() methods. Additionally, security configurations should enforce the use of secure temporary directories with appropriate access controls, and developers should avoid relying on default temporary file creation methods without proper security validation. The remediation process should also include comprehensive code reviews to identify similar insecure patterns throughout the application codebase, as this vulnerability may indicate broader security gaps in temporary file handling practices. Organizations should also consider implementing monitoring solutions to detect unauthorized access attempts to temporary file locations and establish proper logging mechanisms to track file creation and access events for security auditing purposes.

Reservation

01/24/2023

Disclosure

02/18/2023

Moderation

accepted

CPE

ready

EPSS

0.00050

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!