CVE-2016-8640 SQL Injection in pycsw

Critical 9.1 Published Updated

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.

PackageAffectedFixed in
pycsw PyPIAll versions1.8.6, 1.10.5, 2.0.2
pycsw PyPIAll versions1.8.6
pycsw PyPIAll versions1.8.6
pycsw PyPIFrom 1.10.01.10.5
pycsw PyPIFrom 1.10.01.10.5
pycsw PyPIFrom 2.0.02.0.2
1 more packages
pycsw PyPIFrom 2.0.02.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.

Is CVE-2016-8640 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free