Skip to content

fix: correct GHSA-887w-45rq-vxgf sqlalchemy fixed version 1.2.18 -> 1.3.0b1#7486

Merged
advisory-database[bot] merged 2 commits intogithub:DEVSOG12/advisory-improvement-7486from
DEVSOG12:fix/ghsa-sqlalchemy-887w-45rq-vxgf
Apr 24, 2026
Merged

fix: correct GHSA-887w-45rq-vxgf sqlalchemy fixed version 1.2.18 -> 1.3.0b1#7486
advisory-database[bot] merged 2 commits intogithub:DEVSOG12/advisory-improvement-7486from
DEVSOG12:fix/ghsa-sqlalchemy-887w-45rq-vxgf

Conversation

@DEVSOG12
Copy link
Copy Markdown

git merge-base --is-ancestor 30307c4616ad67c01ddae2e1e8e34fabf6028414 rel_1_2_18 returns false — the fix commit was never backported to the 1.2.x release branch. The PyPI artifact for SQLAlchemy 1.2.18 ships lib/sqlalchemy/sql/compiler.py byte-identical to the pre-fix state. The entire 1.2.x series remains vulnerable.

The fix only exists on the main branch starting at 1.3.0b3. The 1.3.0b1-1.3.0b2 range (already correctly marked as affected) is unchanged.

Change: second ECOSYSTEM range fixed: "1.2.18" -> fixed: "1.3.0b1", meaning users on any 1.2.x version must upgrade to 1.3.x to get the fix. Updated details text to reflect this.

Opened on behalf of the SQLAlchemy maintainers (@CaselIT, @zzzeek) per sqlalchemy/sqlalchemy#13252 (comment)

Copilot AI review requested due to automatic review settings April 22, 2026 17:50
@github-actions github-actions Bot changed the base branch from main to DEVSOG12/advisory-improvement-7486 April 22, 2026 17:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the OSV advisory for GHSA-887w-45rq-vxgf / CVE-2019-7164 to reflect that the SQL injection fix was not actually present in the SQLAlchemy 1.2.x line, adjusting the “fixed” version boundary and clarifying the advisory text accordingly.

Changes:

  • Updates the advisory details to explain the missing backport and required upgrade path.
  • Adjusts the PyPI ECOSYSTEM range “fixed” version for the 1.2.x line.
  • Bumps the advisory modified timestamp.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"schema_version": "1.4.0",
"id": "GHSA-887w-45rq-vxgf",
"modified": "2024-10-28T14:20:14Z",
"modified": "2026-04-22T00:00:00Z",
Comment on lines 51 to 55
"introduced": "0"
},
{
"fixed": "1.2.18"
"fixed": "1.3.0b1"
}

This comment was marked as resolved.

],
"summary": "SQLAlchemy vulnerable to SQL Injection via order_by parameter",
"details": "SQLAlchemy through 1.2.17 and 1.3.x through 1.3.0b2 allows SQL Injection via the order_by parameter.",
"details": "SQLAlchemy through 1.2.18 and 1.3.x through 1.3.0b2 allows SQL Injection via the order_by parameter. The fix (commit 30307c4) was never backported to the 1.2.x release branch; users on 1.2.x must upgrade to 1.3.0b3 or later.",
@jayaddison
Copy link
Copy Markdown

Strange: this CVE was not reported as fixed from v1.2.18 until commit 41214dc landed. I'll file an issue here about that - it seems like it was some kind of regression in the advisory metadata.

Addresses review feedback: 1.3.0b1 is itself vulnerable (fixed
in first range at 1.3.0b3), so setting fixed=1.3.0b1 in the
second range would mislead tooling. Collapsing into a single
range with fixed=1.3.0b3 is correct and unambiguous.
@DEVSOG12
Copy link
Copy Markdown
Author

Thanks @jayaddison, good catch, and Copilot's review was spot on here. I've pushed a fix commit.

@jayaddison
Copy link
Copy Markdown

You're welcome; thanks @DEVSOG12

@advisory-database advisory-database Bot merged commit 0cd8cac into github:DEVSOG12/advisory-improvement-7486 Apr 24, 2026
1 check passed
@advisory-database
Copy link
Copy Markdown
Contributor

Hi @DEVSOG12! Thank you so much for contributing to the GitHub Advisory Database. This database is free, open, and accessible to all, and it's people like you who make it great. Thanks for choosing to help others. We hope you send in more contributions in the future!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants