CVE-2021-22572: CWE-377 Insecure Temporary File in Google LLC Data-Transfer-Project
On unix-like systems, the system temporary directory is shared between all users on that system. The root cause is File.createTempFile creates files in the the system temporary directory with world readable permissions. Any sensitive information written to theses files is visible to all other local users on unix-like systems. We recommend upgrading past commit https://github.com/google/data-transfer-project/pull/969
AI Analysis
Technical Summary
CVE-2021-22572 is a medium-severity vulnerability affecting the Google LLC Data-Transfer-Project, specifically related to insecure handling of temporary files on Unix-like systems. The root cause lies in the use of Java's File.createTempFile method, which creates temporary files in the system's shared temporary directory with world-readable permissions. Since the system temporary directory is accessible by all users on the system, any sensitive data written to these temporary files can be read by any local user, leading to potential information disclosure. This vulnerability is categorized under CWE-377 (Insecure Temporary File), which highlights risks associated with improper permissions or handling of temporary files. The issue does not require remote exploitation or network access; it is a local vulnerability exploitable by any user with access to the same Unix-like system. The Data-Transfer-Project is an open-source initiative by Google designed to facilitate data portability between online services, which may involve handling sensitive user data during transfer processes. The vulnerability was addressed in a commit referenced in the description, recommending users upgrade beyond that fix to mitigate the risk. No known exploits are reported in the wild, and the affected versions are unspecified, indicating that users should verify their version and apply patches or updates accordingly.
Potential Impact
For European organizations, the primary impact of CVE-2021-22572 is the potential unauthorized disclosure of sensitive data during data transfer operations on shared Unix-like systems. Since the vulnerability allows any local user on the same system to read temporary files containing sensitive information, organizations with multi-user environments or shared servers are at risk. This could lead to exposure of personal data, intellectual property, or credentials, undermining confidentiality and potentially violating GDPR requirements for data protection. The integrity and availability of systems are less directly impacted by this vulnerability. However, the breach of confidentiality could lead to reputational damage, regulatory fines, and loss of customer trust. Organizations using the Data-Transfer-Project in environments where multiple users have local access, such as shared development or production servers, are particularly vulnerable. The risk is mitigated in environments where strict user isolation or containerization is enforced. Since the vulnerability requires local access and does not involve remote exploitation, the threat is more relevant to insider threats or compromised user accounts within the organization.
Mitigation Recommendations
To mitigate CVE-2021-22572, European organizations should: 1) Upgrade the Data-Transfer-Project to versions that include the fix beyond the referenced commit (https://github.com/google/data-transfer-project/pull/969). 2) Implement strict file permission policies on temporary directories, ensuring that temporary files are created with restrictive permissions (e.g., 600) to prevent unauthorized access. 3) Use isolated environments such as containers or virtual machines to limit the scope of local user access. 4) Employ mandatory access controls (e.g., SELinux, AppArmor) to restrict access to temporary files. 5) Audit and monitor access to temporary directories for unusual activity. 6) Educate developers and system administrators about secure temporary file handling best practices, including avoiding world-readable temporary files. 7) Where possible, configure the application to use dedicated temporary directories with restricted access rather than the system-wide /tmp directory. These steps go beyond generic advice by focusing on permission hardening, environment isolation, and monitoring tailored to the nature of this vulnerability.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Belgium, Italy, Spain
CVE-2021-22572: CWE-377 Insecure Temporary File in Google LLC Data-Transfer-Project
Description
On unix-like systems, the system temporary directory is shared between all users on that system. The root cause is File.createTempFile creates files in the the system temporary directory with world readable permissions. Any sensitive information written to theses files is visible to all other local users on unix-like systems. We recommend upgrading past commit https://github.com/google/data-transfer-project/pull/969
AI-Powered Analysis
Technical Analysis
CVE-2021-22572 is a medium-severity vulnerability affecting the Google LLC Data-Transfer-Project, specifically related to insecure handling of temporary files on Unix-like systems. The root cause lies in the use of Java's File.createTempFile method, which creates temporary files in the system's shared temporary directory with world-readable permissions. Since the system temporary directory is accessible by all users on the system, any sensitive data written to these temporary files can be read by any local user, leading to potential information disclosure. This vulnerability is categorized under CWE-377 (Insecure Temporary File), which highlights risks associated with improper permissions or handling of temporary files. The issue does not require remote exploitation or network access; it is a local vulnerability exploitable by any user with access to the same Unix-like system. The Data-Transfer-Project is an open-source initiative by Google designed to facilitate data portability between online services, which may involve handling sensitive user data during transfer processes. The vulnerability was addressed in a commit referenced in the description, recommending users upgrade beyond that fix to mitigate the risk. No known exploits are reported in the wild, and the affected versions are unspecified, indicating that users should verify their version and apply patches or updates accordingly.
Potential Impact
For European organizations, the primary impact of CVE-2021-22572 is the potential unauthorized disclosure of sensitive data during data transfer operations on shared Unix-like systems. Since the vulnerability allows any local user on the same system to read temporary files containing sensitive information, organizations with multi-user environments or shared servers are at risk. This could lead to exposure of personal data, intellectual property, or credentials, undermining confidentiality and potentially violating GDPR requirements for data protection. The integrity and availability of systems are less directly impacted by this vulnerability. However, the breach of confidentiality could lead to reputational damage, regulatory fines, and loss of customer trust. Organizations using the Data-Transfer-Project in environments where multiple users have local access, such as shared development or production servers, are particularly vulnerable. The risk is mitigated in environments where strict user isolation or containerization is enforced. Since the vulnerability requires local access and does not involve remote exploitation, the threat is more relevant to insider threats or compromised user accounts within the organization.
Mitigation Recommendations
To mitigate CVE-2021-22572, European organizations should: 1) Upgrade the Data-Transfer-Project to versions that include the fix beyond the referenced commit (https://github.com/google/data-transfer-project/pull/969). 2) Implement strict file permission policies on temporary directories, ensuring that temporary files are created with restrictive permissions (e.g., 600) to prevent unauthorized access. 3) Use isolated environments such as containers or virtual machines to limit the scope of local user access. 4) Employ mandatory access controls (e.g., SELinux, AppArmor) to restrict access to temporary files. 5) Audit and monitor access to temporary directories for unusual activity. 6) Educate developers and system administrators about secure temporary file handling best practices, including avoiding world-readable temporary files. 7) Where possible, configure the application to use dedicated temporary directories with restricted access rather than the system-wide /tmp directory. These steps go beyond generic advice by focusing on permission hardening, environment isolation, and monitoring tailored to the nature of this vulnerability.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Date Reserved
- 2021-01-05T00:00:00.000Z
- Cisa Enriched
- true
Threat ID: 682d984bc4522896dcbf7f19
Added to database: 5/21/2025, 9:09:31 AM
Last enriched: 6/20/2025, 1:49:12 PM
Last updated: 8/14/2025, 10:29:09 AM
Views: 13
Related Threats
CVE-2025-8974: Hard-coded Credentials in linlinjava litemall
MediumCVE-2025-8973: SQL Injection in SourceCodester Cashier Queuing System
MediumCVE-2025-21110: CWE-250: Execution with Unnecessary Privileges in Dell Data Lakehouse
MediumCVE-2025-8972: SQL Injection in itsourcecode Online Tour and Travel Management System
MediumCVE-2025-51986: n/a
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.