A new supply-chain attack known as “Revival Hijack” is putting more than 22,000 PyPI packages at risk. This attack method involves registering new projects with the names of previously deleted packages, potentially allowing threat actors to distribute malicious code. The technique leverages the fact that PyPI immediately makes the names of deleted projects available for new registrations, creating a window of opportunity for attackers to exploit. This vulnerability could lead to significant security breaches as developers may inadvertently download and install harmful code when updating their projects.
Researchers from JFrog, a software supply chain platform, have highlighted the gravity of this threat. They report that the monthly average of package deletions on PyPI is about 309, continuously providing new opportunities for attackers to hijack package names. In one notable case, a package named pingdomv3, which was deleted in March, was quickly repurposed by attackers to include a Python trojan targeting Jenkins CI/CD environments. This incident underscores the urgency of addressing the Revival Hijack threat and its potential impact on software supply chains.
In response to this emerging threat, JFrog has taken proactive measures to mitigate the risk. They have created new Python projects with the names of popular deleted packages to prevent malicious actors from hijacking these names. By setting the version numbers of these placeholder projects to 0.0.0.1, JFrog aims to reserve the package names and prevent unauthorized updates. This approach has already seen close to 200,000 downloads from automated scripts and user errors, illustrating the effectiveness of their mitigation strategy.
To safeguard against Revival Hijack attacks, users and organizations are advised to implement several security practices. These include using package pinning to lock in specific, trusted versions, verifying the integrity of packages, and closely monitoring for any unusual update activities or changes in package ownership. By adopting these measures, developers can better protect their projects from the risks posed by this sophisticated supply-chain attack method.
Reference: