# CVE-2012-0805: SQLAlchemy vulnerable to SQL injection

Source: https://junglewise.ai/threats/cve-2012-0805-sqlalchemy-vulnerable-to-sql-injection  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2012-06-05  
License: CC BY 4.0 with a link back

CVE-2012-0805 · Severity: low · CVSS 3.1 · Published 2012-06-05

Multiple SQL injection vulnerabilities in SQLAlchemy before 0.7.0b4, as used in Keystone, allow remote attackers to execute arbitrary SQL commands via the (1) limit or (2) offset keyword to the select function, or unspecified vectors to the (3) select.limit or (4) select.offset function.

Technologies: [SQLAlchemy (PyPI)](https://junglewise.ai/threats/technologies/sqlalchemy). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2012-0805 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2012-0805 being exploited in the wild.

**How severe is CVE-2012-0805?** Low severity, with a CVSS score of 3.1, published 5 June 2012.

**Which products and versions are affected?** SQLAlchemy (PyPI) ECOSYSTEM:introduced=0,fixed=0.7.0, ECOSYSTEM:introduced=0,fixed=0.7.0b4.

**Is there a fix for CVE-2012-0805?** Yes. SQLAlchemy (PyPI): upgrade to 0.7.0, 0.7.0b4 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2012-0805?** Check whether you run SQLAlchemy (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- SQLAlchemy (PyPI): upgrade to 0.7.0, 0.7.0b4 or later

  ```sh
  pip install "SQLAlchemy>=0.7.0b4"
  ```


## Affected products

- SQLAlchemy (PyPI) ECOSYSTEM:introduced=0,fixed=0.7.0, ECOSYSTEM:introduced=0,fixed=0.7.0b4

## Identifiers

- CVE-2012-0805
- GHSA-hfg2-wf6j-x53p
- PYSEC-2012-9

## Related threats

- [SQLAlchemy vulnerable to SQL Injection via order_by parameter](https://junglewise.ai/threats/cve-2019-7164-sqlalchemy-vulnerable-to-sql-injection-via-order-by-parameter)
- [PYSEC-2019-53 - SQLAlchemy through 1.2.17 and 1.3.x through 1.3.0b2 allows SQL Injection via the order_by parameter.](https://junglewise.ai/threats/pysec-2019-53-sqlalchemy-through-1-2-17-and-1-3-x-through-1-3-0b2-6bad9589)
- [PYSEC-2019-124 - SQLAlchemy 1.2.17 has SQL Injection when the group_by parameter can be controlled.](https://junglewise.ai/threats/cve-2019-7548-sqlalchemy-sql-injection-in-group-by-parameter)
- [PYSEC-2019-54 - SQLAlchemy 1.2.17 has SQL Injection when the group_by parameter can be controlled.](https://junglewise.ai/threats/pysec-2019-54-sqlalchemy-1-2-17-has-sql-injection-when-the-group-by-c13f4d60)
