djangorestframework

Web APIs for Django. 🎸

Version: 2.2.4 registry icon
Safety score
30
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security Risks of Known Vulnerabilities
CVE-2018-25045
CWE-79
Threat level: MEDIUM | CVSS score: 6.1

Django REST framework (aka django-rest-framework) before 3.9.1 allows XSS because the default DRF Browsable API view templates disable autoescaping.



CVE-2026-114138
CWE-400
Threat level: HIGH | CVSS score: 8

DRF's content negotiation parses each Accept token several times per request and never limits the number of tokens or their total size. Each parse ends up in Django's parse_header_parameters, which takes quadratic time when a quoted parameter value is packed with semicolons. On my machine a single GET with a 780KB Accept header made of 96 such tokens kept one gunicorn worker busy for 18.87 seconds (Django 6.1, djangorestframework 3.18.0, gunicorn 26.0.0, Python 3.13, Docker on macOS). The header is syntactically valid, fits inside gunicorn's default header limits, and needs no authentication. Two concurrent requests, which is one per sync worker, made a default two worker deployment stop answering for my whole 40 second test window. It recovered half a second after I stopped sending.



Please note that this component is affected by 4 other vulnerabilities
0 Critical  |  0 High  |  4 Medium  |  0 Low  |  0 Suggest

Latest safe major: 3.18.3 Scan your application codebase with Meterian to see all known vulnerabilities in your open source software dependencies.


Stability

Stay updated with the latest patches and releases. Plan your sofware desisgn. Avoid common known vulnerabilities fixed by the open source community

Latest patch release:   2.2.7

Latest minor release:   2.4.8

Latest major release:   3.18.3

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

BSD   -   BSD License (Generic)

Is a wildcard

Not proprietary

OSI Compliant