Code scan issue: URLValidator does not prohibit newlines and tabs

45 Views Asked by At

I am getting vulnerability while prisma scan.

- CVM : CVE-2021-32052
- PACKAGE : Python
- VERSION: 3.9.18
- STATUS: fixed in 3.2.2, 3.1.10, 2.2.22 
- DESCRIPTION: In Django 2.2 before 2.2.22, 3.1 before 3.1.10, and 3.2 before 3.2.2 (with Python 3.9.5+), URLValidator does not prohibit newlines and tabs (unless the URLField form field is used). If an application uses values with newlines in an HTTP response, header injection can occur. Django itself is unaffected because HttpResponse prohibits newlines in HTTP headers. (CVE-2021-32052)

We are not using django at all. But it seems some dependency packages causing the above vulnerability while code scan.

Question is:

How can I check, which package version causing issue or what code change need to do for resolving issue:

URLValidator does not prohibit newlines and tabs (unless the URLField form field is used). If an application uses values with newlines in an HTTP response, header injection can occur. Django itself is unaffected because HttpResponse prohibits newlines in HTTP headers.
0

There are 0 best solutions below