[JFrog] Leaked PyPI Credentials: Supply Chain Attack Risks and Prevention
- DevOps Tec

- 2025年8月12日
- 讀畢需時 3 分鐘
已更新:2025年9月5日

In modern software development environments, software supply chain security has become a critical issue that cannot be ignored. Recently, JFrog’s security team discovered a potential supply chain attack incident: a set of sensitive PyPI credentials were accidentally embedded in binary files, which could be exploited by attackers to perform malicious actions. This incident serves as a wake-up call for developers, highlighting the urgency of strengthening supply chain security defenses.
The Importance of Supply Chain Security

With the widespread use of open source software, the security of the software supply chain has attracted increasing attention. Any negligence in the process could allow attackers to misuse leaked credentials to tamper with software components, thereby affecting thousands of end users. The incident discovered by JFrog reveals another attack vector in supply chain attacks: sensitive information leaked inside binary files.
Once attackers obtain such sensitive information, it could cause catastrophic damage to the software ecosystem.
Discovery and Analysis of the Incident

JFrog’s security experts used specialized binary scanning technology to uncover the credential leak. They detected that some developers accidentally embedded PyPI credentials into binary files during the software build and distribution process. These credentials are normally used to authenticate and access PyPI resources, but once leaked, attackers could use them to publish malicious packages or steal confidential data.
The following shows a comparison between the decompiled build.cpython-311.pyc file and the actual source code inside a Docker container:

Source code reconstructed from the binary build.cpython-311.pyc file

Actual source code from the corresponding file inside the Docker container

If tokens are placed in binary files, this could trigger the kind of attack described in this incident.

This discovery demonstrates the importance of binary scanning technology, especially for proactive defense in the early stages of the supply chain. JFrog successfully prevented an attack that could have had serious consequences, showing the critical role of preventive measures in supply chain security.
Learning from Lessons and Taking Action

The automated scanning capabilities provided by JFrog Xray can help security teams more effectively face threats such as vulnerabilities or embedded malicious credentials or dependency packages.
However, the lessons from this incident clearly show that in addition to systems, company operations must also adopt stricter measures to prevent similar security risks. To enhance supply chain security, developers should follow these best practices:
Regularly scan binary files: Use professional tools to comprehensively scan binaries to detect risks of sensitive information or credential leaks.
Implement credential management policies: Follow strict security policies for generating, storing, and using credentials, and regularly rotate credentials to reduce the risk of misuse.
Raise developer security awareness: Conduct security training to help developers understand the potential risks of embedding sensitive information in code and how to handle credentials securely.
Adopt automated security tools: Automated tools can assist organizations in monitoring and detecting potential security threats, allowing vulnerabilities to be discovered and patched in a timely manner.
Building a Safer Future
Threats from supply chain attacks are increasing day by day, but the discovery of incidents and the adoption of preventive measures show that this is a fight that can be won. Through effective technical means and rigorous security management strategies, we can greatly reduce the likelihood of similar events. This incident reminds developers once again that security is not achieved overnight but requires continuous investment and improvement.
Only by working together to strengthen comprehensive protection of the software supply chain can we better safeguard application security in the digital age and build a more resilient software ecosystem.
For more information about JFrog and its features, the DevOps Tec professional consulting team welcomes your inquiries via email or phone.
![[JFrog] Simplifying DevSecOps for the Perfect Balance of Speed and Security](https://static.wixstatic.com/media/f087dc_b7166d0495c44d20b162a92c721322c7~mv2.png/v1/fill/w_980,h_514,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/f087dc_b7166d0495c44d20b162a92c721322c7~mv2.png)
![[JFrog] What is SBOM? Enhancing Software Supply Chain Transparency and Reliability](https://static.wixstatic.com/media/f087dc_cf3963993ae34299b561f98af77763e6~mv2.png/v1/fill/w_980,h_514,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/f087dc_cf3963993ae34299b561f98af77763e6~mv2.png)
![[JFrog] A Comprehensive Software Supply Chain Management Platform to Achieve DevSecOps](https://static.wixstatic.com/media/f087dc_8bf05508123f45399ea81b2a63ccca5f~mv2.png/v1/fill/w_980,h_514,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/f087dc_8bf05508123f45399ea81b2a63ccca5f~mv2.png)
留言