# PYSEC-2019-53 - SQLAlchemy through 1.2.17 and 1.3.x through 1.3.0b2 allows SQL Injection via the order_by parameter.

Source: https://junglewise.ai/threats/pysec-2019-53-sqlalchemy-through-1-2-17-and-1-3-x-through-1-3-0b2-6bad9589  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2019-02-20  
License: CC BY 4.0 with a link back

Severity: info · Published 2019-02-20

SQLAlchemy through 1.2.17 and 1.3.x through 1.3.0b2 allows SQL Injection via the order_by parameter.

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

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Informational severity, published 20 February 2019.

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

**Is there a fix for This vulnerability?** Yes. SQLAlchemy (PyPI): upgrade to 1.2.18 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected?** 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 1.2.18 or later

  ```sh
  pip install "SQLAlchemy>=1.2.18"
  ```


## Affected products

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

## 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-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)
- [SQLAlchemy vulnerable to SQL injection](https://junglewise.ai/threats/cve-2012-0805-sqlalchemy-vulnerable-to-sql-injection)
