Vulnerability · Published Nov 10, 2023 · Assigned by GitHub_M
CVE-2023-47128piccolo SQL Injection via named transaction savepoints
Critical 9.1
In plain English
A critical-severity SQL injection in piccolo from piccolo-orm. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 56% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Piccolo is an object-relational mapping and query builder which supports asyncio. Prior to version 1.1.1, the handling of named transaction `savepoints` in all database implementations is vulnerable to SQL Injection via f-strings. While the likelihood of an end developer exposing a `savepoints` `name` parameter to a user is highly unlikely, it would not be unheard of. If a malicious user was able to abuse this functionality they would have essentially direct access to the database and the ability to modify data to the level of permissions associated with the database user. A non exhaustive list of actions possible based on database permissions is: Read all data stored in the database, including usernames and password hashes; insert arbitrary data into the database, including modifying existing records; and gain a shell on the underlying server. Version 1.1.1 fixes this issue.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | piccolo | 1.1.1 | GHSA-xq59-7jf3-rjc6 |
| PyPI | piccolo | 1.1.1 | PYSEC-2023-241 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| piccolo-orm | piccolo | < 1.1.1 |
Weakness: CWE-89 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N