Announcing findings from security audit

Natalie Arellano
Buildpacks
Published in
3 min read1 day ago

The CNB project is proud to have recently completed a security review, working with Quarkslab and the Open Source Technology Improvement Fund (OSTIF). Today, we are publishing releases of pack (0.35.0) and the lifecycle (0.20.0) that contain fixes for vulnerabilities identified in the review. Please upgrade as soon as possible to get the benefit of these fixes.

This post discusses the high severity vulnerabilities identified in the review and provides links to the full list of vulnerabilities and their remediations. Findings and recommendations from the review are also discussed on Quarkslab’s blog and OSTIF’s blog.

Spotlight: high severity issues

Many of the vulnerabilities, especially the high severity ones, relate to the use of pack and the lifecycle in CI/CD systems, such as multi-tenant build environments using a shared Docker host.

(High 1) Host compromise by overwriting trusted container images — this can occur when a shared Docker host is used as both a source and a sink for build input and output images. A malicious pack user could build an application image with the same image name as a build input (such as builder, lifecycle, or run images), causing future builds by other users of the build system to pull in the malicious input. We address this problem by:

  • Forbidding application names that match trusted build inputs (pack issue)
  • Warning pack users to pull build inputs from a registry when we detect that pack is running in a container (a common scenario for a shared Docker host) (pack issue)

A registry is a safer source for build inputs as user permissions prevent unauthorized writes

  • Informing our end users that using ​​a shared Docker host as a source for build inputs is insecure

(High 2) Cache poisoning by accessing other applications’ caches — this can occur when volumes managed by a shared Docker host are used as build and launch caches. We address this problem by:

  • Introducing the concept of a pack “volume key” that will make volume names difficult to determine without the key (pack issue)
  • Informing our end users that cache images (stored in a registry) are safer repositories for build caches (see above re: user permissions)

In total

The full list of vulnerabilities identified and their remediations are shown below:

(High 1) Host compromise by overwriting trusted container images

(High 2) Cache poisoning by accessing other applications’ caches

(Med 1) Docker in-container privilege escalation

(Med 2) Docker permissive inter-container connectivity

(Low 1) Denial-of-Service (DoS) provoked by race condition

(Low 2) Denial-of-Service (DoS) provoked by removing build cache tarballs or altering the OCI image manifest

(Low 3) Denial-of-Service (DoS) provoked by an unbound execution time

(Low 4) Data leak by accessing other applications’ caches

(Info 1) Specification violation using Docker and user namespaces

(Info 2) Excessive Docker container capabilities

Feedback welcome

The CNB project is constantly striving to make our software the most secure and reliable for platforms and developers everywhere.

Found a security issue? We appreciate your help! Follow the instructions in our security policy to report it responsibly.

Got feedback or want to join the conversation? Head over to our community page. We’d love to hear from you!

--

--