CVE-2012-0805 SQLAlchemy vulnerable to SQL injection
Remote attackers can execute arbitrary SQL commands via crafted limit or offset parameters in SQLAlchemy select functions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2012-0805?
CVE-2012-0805 is a high-severity SQL injection vulnerability in n/a, published on 5 Jun 2012. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-89
Which versions are affected by CVE-2012-0805?
3 open source packages ship an affected version, including sqlalchemy and SQLAlchemy. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
sqlalchemy PyPI | All versions | 0.7.0 |
sqlalchemy PyPI | All versions | 0.7.0b4 |
SQLAlchemy PyPI | All versions | 0.7.0b4 |
Linux distribution packages (2)
python-sqlalchemy Red Hat:enterprise_linux:6::server | All versions | 0:0.5.5-3.el6_2 |
python-sqlalchemy Red Hat:enterprise_linux:6::workstation | All versions | 0:0.5.5-3.el6_2 |
Products include Sqlalchemy Sqlalchemy.
How do I fix CVE-2012-0805?
Upgrade sqlalchemy to a fixed version for your release line: 0.7.0 or 0.7.0b4.
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-2012-0805 being exploited?
There is no known exploitation of CVE-2012-0805 in the wild and no public exploit code.
Sources
Also known as DEBIAN-CVE-2012-0805, DSA-2449-1, GHSA-hfg2-wf6j-x53p, PYSEC-2012-9, RHSA-2012:0369.