I have a docker base image when uploaded to quay image repository give the vulnerability pyup.io-43366 (CVE-2021-43818).
The base image is
FROM quay/registry.redhat.io/rhel7:latest
MAINTAINER Me
LABEL description="Application runtime image" \
name="Image name" \
version="1.0"
ENV LANG en_US.UTF-8
RUN yum-config-manager \
&& yum -y install java-11-openjdk \
&& yum -y clean all
CMD ["/bin/bash"]
Is there any way I can overcome this vulnerability?
First, you can list tags from rhel7, using the
regclientproject from Brandon Mitchell (sudo-bmitch, top contributor on Stack Overflow), with:(on Windows:
grep -Ev (source^|[0-9][0-9][0-9][0-9]): note the^)Second, I do not see CVE-2021-43818 in latest, using anchore/grype
The closest is
CVE-2021-3541, a flaw was found inlibxml2-python.In your case, considering Lxml 4.6.5 includes a fix for CVE-2021-43818, you would need an image with Lxml 4.6.5+.
If that image does not exist yet, you could
docker buildyour own startingFROM registry.access.redhat.com/rhel7:7.9, and adding the rightlibxml.And publish it to Quay.