CVE-2018-1000656: Flask Denial of Service Vulnerability
HIGHCVE-2018-1000656 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-20: Improper Input Validation) affecting Flask libraries in the PyPI ecosystem. The issue involves flask is vulnerable to denial of service via incorrect encoding of json data. Remediation is available by upgrading affected packages to version 0.12.3.
CVE-2018-1000656 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2018-1000656
To remediate this vulnerability, upgrade all affected Flask dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install Flask>=0.12.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show Flask
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2018-1000656, inspect your installed packages using pip:
pip show Flask
Analyze the terminal output to locate any version of Flask in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.12.3), your application is affected.
Note: The pip show Flask command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Flask, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2018-1000656 Affected Flask Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Flask
|
PyPI |
< 0.12.3
|
0.12.3
|
References
Frequently Asked Questions
What is CVE-2018-1000656?
Which Flask versions are affected?
What version fixes CVE-2018-1000656?
Is Flask affected?
What is the CVSS score of CVE-2018-1000656?
What CWE is associated with CVE-2018-1000656?
How can I check PyPI dependencies for CVE-2018-1000656?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-562c-5r94-xh97",
"modified" : "2024-09-20T20:16:29Z",
"published" : "2018-08-23T19:10:40Z",
"aliases" : [ "CVE-2018-1000656" ],
"summary" : "Flask is vulnerable to Denial of Service via incorrect encoding of JSON data",
"details" : "The Pallets Project flask version Before 0.12.3 contains a CWE-20: Improper Input Validation vulnerability in flask that can result in Large amount of memory usage possibly leading to denial of service. This attack appear to be exploitable via Attacker provides JSON data in incorrect encoding. This vulnerability appears to have been fixed in 0.12.3.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Flask"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.12.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1000656"
}, {
"type" : "WEB",
"url" : "https://github.com/pallets/flask/pull/2691"
}, {
"type" : "WEB",
"url" : "https://github.com/pallets/flask/commit/b178e89e4456e777b1a7ac6d7199052d0dfdbbbe"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-562c-5r94-xh97"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pallets/flask"
}, {
"type" : "WEB",
"url" : "https://github.com/pallets/flask/releases/tag/0.12.3"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/flask/PYSEC-2018-66.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2019/08/msg00025.html"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20190221-0001"
}, {
"type" : "WEB",
"url" : "https://usn.ubuntu.com/4378-1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:00:05Z",
"nvd_published_at" : null
}
}