From the package version numbers, it looks like Debian 9 ("stretch"), which is the oldstable
version since 2019-07-06. Maybe it's time to consider updating your Docker image to use a newer stable version?
CVE-2017-12424 appears to be about the /usr/sbin/newusers
tool, which is in the passwd
package. If you don't need that specific tool in your Docker image, maybe use a .dockerignore
file to omit it entirely, as a workaround?
shadow
is the source code package that builds multiple utilities: Debian packages the utilities into three separate packages. In this case, the vulnerable utility is in the passwd
package, which would need to be upgraded; however, Debian 9 does not currently seem to have a newer version of the package available. Only Debian 10 ("buster", the new stable
version) and above has the fixed version available.
Moving up to a passwd
package from Debian 10 without upgrading the rest of the image to match is likely to cause library dependency errors. Upgrading your entire base image from Debian 9 to Debian 10 might be a good investment of your time at this point.
But if you want a fixed version of the passwd
package that is compatible with other Debian 9 packages right now, you might have to download the Debian source package for shadow 4.5-1.1 to a Debian 9 system with the compiler and other build tools installed, and run a dpkg-buildpackage
on the sources to get a newer version of the passwd
package that is compiled against the libraries of Debian 9. Injecting this custom package into your Docker image build process would be your task.
(As a side effect of the build, you will also get newer versions of packages login
and uidmap
: however, as long as the standard Debian 9 versions of those packages don't have any known vulnerable contents, you'll have the option of ignoring them.)
Note that CVE-2017-12424 applies only if you have a system in place that allows unprivileged users to run the newusers
command in a privileged context, e.g. a Control Panel in a web-hosting environment or an /etc/sudoers
entry that allows a non-root user to run newusers
as root. This is probably the reason why the fixed version has not been propagated to Debian 9 yet: the security team did not consider it a high-priority issue.
FROM
lines in your Dockerfiles.)passwd
andlogin
package.