CVE-2012-0805 SQLAlchemy vulnerable to SQL injection

High 7.5 Published Updated

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.

PackageAffectedFixed in
sqlalchemy PyPIAll versions0.7.0
sqlalchemy PyPIAll versions0.7.0b4
SQLAlchemy PyPIAll versions0.7.0b4
Linux distribution packages (2)
python-sqlalchemy Red Hat:enterprise_linux:6::serverAll versions0:0.5.5-3.el6_2
python-sqlalchemy Red Hat:enterprise_linux:6::workstationAll versions0: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.

Is CVE-2012-0805 in your software?

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

Check your SBOMs for free