CVE-2016-8640 SQL Injection in pycsw
SQL injection in pycsw allows attackers to read, modify, or delete database contents accessible to the database user.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2016-8640?
CVE-2016-8640 is a critical SQL injection vulnerability in https://github.com/geopython pycsw, published on 1 Aug 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
A SQL injection vulnerability in pycsw all versions before 2.0.2, 1.10.5 and 1.8.6 that leads to read and extract of any data from any table in the pycsw database that the database user has access to. Also on PostgreSQL (at least) it is possible to perform updates/inserts/deletes and database modifications to any table the database user has access to.
Weakness: CWE-89
Which versions are affected by CVE-2016-8640?
7 open source packages ship an affected version, including pycsw. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pycsw PyPI | All versions | 1.8.6, 1.10.5, 2.0.2 |
pycsw PyPI | All versions | 1.8.6 |
pycsw PyPI | All versions | 1.8.6 |
pycsw PyPI | From 1.10.0 | 1.10.5 |
pycsw PyPI | From 1.10.0 | 1.10.5 |
pycsw PyPI | From 2.0.0 | 2.0.2 |
1 more packages
pycsw PyPI | From 2.0.0 | 2.0.2 |
Products include Pycsw Pycsw.
How do I fix CVE-2016-8640?
Upgrade pycsw to a fixed version for your release line: 1.8.6, 1.10.5 or 2.0.2.
Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.
Is CVE-2016-8640 being exploited?
There is no known exploitation of CVE-2016-8640 in the wild and no public exploit code.
Sources
Also known as DEBIAN-CVE-2016-8640, GHSA-hg4c-rgvm-964g, PYSEC-2018-98, UBUNTU-CVE-2016-8640.