CVE-2012-2945: Hadoop symlink vulnerability in org.apache.hadoop:hadoop-main
Summary
CVE-2012-2945: Hadoop symlink vulnerability. Affects org.apache.hadoop:hadoop-main versions < 1.0.4. Fixed in 1.0.4. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Hadoop is an open-source framework used for distributed storage and processing of large datasets. The 'org.apache.hadoop:hadoop-main' package is a Maven package that provides the core functionality of Hadoop. It includes features for distributed file systems, data processing, and resource management. Hadoop 1.0.3 is affected by a symlink vulnerability due to the default storage of pid files in the shared '/tmp' directory.
Vulnerability Detail
The symlink vulnerability in Hadoop 1.0.3 allows an attacker to manipulate the pid files stored in the '/tmp' directory. By creating a malicious symlink, an attacker can overwrite or modify critical files, potentially leading to unauthorized access, data corruption, or denial of service. This vulnerability poses a high risk to the integrity and availability of Hadoop systems.
How To Fix
Latest published version: 3.5.0 as of 22 Oct 2026
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.0.4
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a workaround, users can manually change the configuration to store pid files in a different directory that is not accessible by other users. This can be done by modifying the 'hadoop-env.sh' file and setting the 'HADOOP_PID_DIR' variable to a secure location. Here is an example:
export HADOOP_PID_DIR=/var/run/hadoop
Conclusion
The Hadoop symlink vulnerability in org.apache.hadoop:hadoop-main (CVE-2012-2945) allows attackers to manipulate pid files, potentially leading to unauthorized access, data corruption, or denial of service. To fix this vulnerability, it is recommended to upgrade to Hadoop version 1.0.4 or later. Alternatively, users can mitigate the vulnerability by changing the configuration to store pid files in a secure and isolated directory. For further support on vulnerability remediation, contact DevNack.com.
See every vulnerability recorded for org.apache.hadoop:hadoop-main →
FAQ
The vulnerability allows an attacker to manipulate pid files, potentially leading to unauthorized access, data corruption, or denial of service.
You can use Vulert's playground (https://vulert.com/scanner) to check if your Hadoop installation is affected by this vulnerability. Simply provide your pom.xml file, and Vulert will analyze it for open-source vulnerabilities in real-time.
Yes, upgrading to Hadoop version 1.0.4 or later will address the symlink vulnerability.
Yes, you can mitigate the vulnerability by changing the configuration to store pid files in a secure and isolated directory.
You can find more information about this vulnerability in the GitHub Advisory Database: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/04/GHSA-v5c9-98f7-2h54/GHSA-v5c9-98f7-2h54.json
Related vulnerabilities
Recent vulnerabilities recorded for org.apache.hadoop:hadoop-main.