CVE-2021-31402: dio vulnerable to CRLF injection with HTTP method string
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.57017%
CWE
Published
3/21/2023
Updated
10/5/2023
KEV Status
No
Technology
Dart
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
dio | pub | < 5.0.0 | 5.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from missing validation of the HTTP method string before constructing requests. The patch introduced the _isValidToken validation check in _transformData, which was absent in vulnerable versions. Since _transformData is the entry point for request processing and directly used the unvalidated options.method parameter, its lack of validation made it the vulnerable entry point for CRLF injection.