5.27 Ensure that Docker commands always make use of the latest version of their image

Information

You should always ensure that you are using the latest version of the images within your repository and not cached older versions.

Rationale:

Multiple Docker commands such as docker pull, docker run etc. are known to have an issue where by default, they extract the local copy of the image, if present, even though there is an updated version of the image with the same tag in the upstream repository. This could lead to using older images containing known vulnerabilites.

NOTE: Nessus has not performed this check. Please review the benchmark to ensure target compliance.

Solution

You should use proper version pinning mechanisms (the 'latest' tag which is assigned by default is still vulnerable to caching attacks) to avoid extracting cached older versions. Version pinning mechanisms should be used for base images, packages, and entire images. You can customize version pinning rules according to your requirements.

Impact:

None

Default Value:

By default, Docker commands extract the local copy unless version pinning mechanisms are used or the local cache is cleared.

See Also

https://workbench.cisecurity.org/files/2433