uvicorn-gunicorn-docker
uvicorn-gunicorn-docker copied to clipboard
Update PyYAML to >= 5.4 for CVE-2020-14343
Hello! I'm encountering a security failure for pipenv check
using one of these base images.
Issue
- IMAGE:
tiangolo/uvicorn-gunicorn:python3.8-slim-2020-12-19
- CVE-2020-14343
#9 11.44 Checking PEP 508 requirements...
#9 11.49 Passed!
#9 11.49 Checking installed package safety...
#9 13.31 39611: pyyaml <5.4 resolved (5.3.1 installed)!
#9 13.31 A vulnerability was discovered in the PyYAML library in versions before 5.4, where it is susceptible to arbitrary code execution when it processes untrusted YAML files through the full_load method or with the FullLoader loader. Applications that use the library to process untrusted input may be vulnerable to this flaw. This flaw allows an attacker to execute arbitrary code on the system by abusing the python/object/new constructor. This flaw is due to an incomplete fix for CVE-2020-1747. See CVE-2020-14343.
Reproduce
Simple Dockerfile:
FROM tiangolo/uvicorn-gunicorn:python3.8-slim-2020-12-19 as base
RUN pip freeze \
&& pip install pipenv \
&& pipenv check
docker build .
..........
#6 [base 2/2] RUN pip freeze
#6 sha256:e76efe7bb1013b8ea339937c42cd3938acaff5f50fc90d629df2396671b97ca4
#6 0.553 click==7.1.2
#6 0.553 gunicorn==20.0.4
#6 0.553 h11==0.11.0
#6 0.553 httptools==0.1.1
#6 0.553 python-dotenv==0.15.0
#6 0.553 PyYAML==5.3.1
#6 0.553 uvicorn==0.13.1
#6 0.553 uvloop==0.14.0
#6 0.553 watchgod==0.6
#6 0.553 websockets==8.1
#6 DONE 0.6s
Where PyYAML==5.3.1
must be updated.
Gist
https://gist.github.com/adveres/a1ddf55cd4491907431ae5f062ca38f2
This actually appears to come from the standard uvicorn install (https://www.uvicorn.org/#quickstart), ex pip install uvicorn[standard]
in the dockerfile. So probably uvicorn itself needs to update its dependency?
There have been some releases since this was posted, could you check again and confirm it's solved?
Sorry for the long delay! 🙈 I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.
Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.