Open-Source Software Security
Open-source software security is managing the risks of using free, publicly developed code, especially vulnerable or malicious dependencies, which make up most of the code in modern applications.
Also called: OSS security, dependency vulnerability, vulnerable dependencies, software composition analysis, SCA
What is open-source software security?
Open-source software is code anyone can use, inspect and contribute to, from operating systems like Linux to the thousands of small libraries developers pull into their applications. It powers nearly all modern software, including the commercial products small businesses buy. CISA's open-source security roadmap notes how central open source is to critical infrastructure and government systems.
Open source isn't less secure than commercial software by nature, but using it brings specific risks that need managing.
The main risks
- Vulnerable dependencies. A flaw in a popular library affects every application that includes it. Log4Shell, in the Log4j logging library, affected countless products in 2021 and was still being exploited years later.
- Transitive dependencies. Your code uses library A, which uses B, which uses C. A flaw deep in that chain is easy to miss.
- Malicious packages. Attackers publish packages with names similar to popular ones (typosquatting), or take over abandoned projects, to slip malware into software builds.
- Compromised maintainers. In 2024, a backdoor was discovered in the xz Utils compression library, planted by a contributor who had spent years earning maintainers' trust. It was caught just before it reached mainstream Linux releases.
- Unmaintained projects that no longer receive security fixes.
How to manage it
- Know what you use. Generate a software bill of materials for your applications.
- Scan dependencies continuously with software composition analysis (SCA) tools, such as OWASP Dependency-Check, GitHub Dependabot or commercial products, in your CI/CD pipeline.
- Update promptly, prioritizing flaws that are actively exploited.
- Vet new dependencies: check maintenance activity, popularity and security history before adopting them.
- Pin versions and verify integrity with lockfiles and checksums, and use trusted package registries or a private mirror.
- Remove unused dependencies.
For businesses that don't write code
Ask your software vendors how they track and patch open-source components, and whether they can provide an SBOM. See supply chain attack.
Related terms
Sources
Drafted with AI assistance, then edited and fact-checked by a person. How we use AI.
