CVE-2023-41885
Piccolo's current `BaseUser.login` implementation is vulnerable to time based user enumeration
Piccolo is an ORM and query builder which supports asyncio. In versions 0.120.0 and prior, the implementation of BaseUser.login leaks enough information to a malicious user such that they would be able to successfully generate a list of valid users on the platform. As Piccolo on its own does not also enforce strong passwords, these lists of valid accounts are likely to be used in a password spray attack with the outcome being attempted takeover of user accounts on the platform. The impact of this vulnerability is minor as it requires chaining with other attack vectors in order to gain more then simply a list of valid users on the underlying platform. The likelihood of this vulnerability is possible as it requires minimal skills to pull off, especially given the underlying login functionality for Piccolo based sites is open source. This issue has been patched in version 0.121.0.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.3
Piccolo's current `BaseUser.login` implementation is vulnerable to time based user enumeration
Piccolo is an ORM and query builder which supports asyncio. In versions 0.120.0 and prior, the implementation of BaseUser.login leaks enough information to a malicious user such that they would be able to successfully generate a list of valid users on the platform. As Piccolo on its own does not also enforce strong passwords, these lists of valid accounts are likely to be used in a password spray attack with the outcome being attempted takeover of user accounts on the platform. The impact of this vulnerability is minor as it requires chaining with other attack vectors in order to gain more then simply a list of valid users on the underlying platform. The likelihood of this vulnerability is possible as it requires minimal skills to pull off, especially given the underlying login functionality for Piccolo based sites is open source. This issue has been patched in version 0.121.0.
- Record
CVE-2023-41885- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-204
- Updated
- 2026-11-02
EUVDEUVD-2023-0196
5.3
Piccolo is an ORM and query builder which supports asyncio. In versions 0.120.0 and prior, the implementation of BaseUser.login leaks enough information to a malicious user such that they would be able to successfully generate a list of valid users on the platform. As Piccolo on its own does not also enforce strong passwords, these lists of valid accounts are likely to be used in a password spray attack with the outcome being attempted takeover of user accounts on the platform. The impact of this vulnerability is minor as it requires chaining with other attack vectors in order to gain more then simply a list of valid users on the underlying platform. The likelihood of this vulnerability is possible as it requires minimal skills to pull off, especially given the underlying login functionality for Piccolo based sites is open source. This issue has been patched in version 0.121.0.
- Record
EUVD-2023-0196- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-h7cm-mrvq-wcfr
5.3
Piccolo's current `BaseUser.login` implementation is vulnerable to time based user enumeration
Summary
Short summary of the problem. Make the impact and severity as clear as possible. For example: An unsafe deserialization vulnerability allows any unauthenticated user to execute arbitrary code on the server.
The current implementation of BaseUser.login leaks enough information to a malicious user such that they would be able to successfully generate a list of valid users on the platform. As Piccolo on it's own does not also enforce strong passwords (see here), these lists of valid accounts are likely to be used in a password spray attack with the outcome being attempted takeover of user accounts on the platform.
The impact of this vulnerability is minor as it requires chaining with other attack vectors in order to gain more then simply a list of valid users on the underlying platform. The likelihood of this vulnerability is possible as it requires minimal skills to pull off especially given the underlying login functionality for Piccolo based sites is open source.
Details
Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer.
This vulnerability relates to this code. Specifically the fact that responses are not returned in constant time, but rather are based off the internal state.
For example, if a user does not exist then None is returned immediately instead of encountering a time expensive hash comparison (Line 225). This discrepancy allows a malicious user to time requests made in order to generate a list of usernames which are valid on the underlying platform for usage in further attacks.
If your curious for some more information regarding this attack avenue, I wrote a blog post awhile back with a similar chain to this with some other types of analysis. It lives here.
PoC
Complete instructions, including specific configuration details, to reproduce the vulnerability.
Piccolo Setup
- In a fresh environment
pip install 'piccolo[all]'andpiccolo asgi new - For simplified testing purposes, in
piccolo_conf.pymodify Piccolo to use SQLite:
from piccolo.engine.sqlite import SQLiteEngine
DB = SQLiteEngine()
- In the same file, add the required apps for session authentication. The file should look like the following:
from piccolo.engine.sqlite import SQLiteEngine
from piccolo.conf.apps import AppRegistry
DB = SQLiteEngine()
APP_REGISTRY = AppRegistry(
apps=[
"home.piccolo_app",
"piccolo_admin.piccolo_app",
"piccolo_api.session_auth.piccolo_app",
"piccolo.apps.user.piccolo_app",
]
)
- Run the following migrations:
piccolo migrations forwards user
piccolo migrations forwards session_auth
- Within
app.py, mountsession_loginat the/loginpath as follows:
from piccolo_api.session_auth.endpoints import session_login
app.mount("/login", session_login())
- Create a new user using
piccolo user create, making a note of the username and password for later steps.
Exploitation
The following Python script can be used to reproduce this issue. It could also be expanded to easily take in user lists to conduct user enumeration at scale, however, that is outside the scope of this report.
import asyncio
import time
from collections import defaultdict
import httpx
number_of_attempts = 50
# Set this to the username from step 6.
valid_username = "skelmis"
invalid_username = "invalid"
data = defaultdict(lambda: [])
# Ensure this points to your current enviroment
local_base_url = "http://127.0.0.1:8000"
# Set this to the password from step 6.
valid_password = "disobey-blunt-kindly-postbox-tarantula"
invalid_password = "cabana-polar-secrecy-neurology-pacific"
async…
- Record
GHSA-h7cm-mrvq-wcfr- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-203, CWE-204
- Updated
- 2026-11-02
NVD
5.3
Piccolo is an ORM and query builder which supports asyncio. In versions 0.120.0 and prior, the implementation of BaseUser.login leaks enough information to a malicious user such that they would be able to successfully generate a list of valid users on the platform. As Piccolo on its own does not also enforce strong passwords, these lists of valid accounts are likely to be used in a password spray attack with the outcome being attempted takeover of user accounts on the platform. The impact of this vulnerability is minor as it requires chaining with other attack vectors in order to gain more then simply a list of valid users on the underlying platform. The likelihood of this vulnerability is possible as it requires minimal skills to pull off, especially given the underlying login functionality for Piccolo based sites is open source. This issue has been patched in version 0.121.0.
- Record
CVE-2023-41885- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-204, CWE-203
- Updated
- 2026-11-02
OSV
5.3
Piccolo's current `BaseUser.login` implementation is vulnerable to time based user enumeration
Piccolo is an ORM and query builder which supports asyncio. In versions 0.120.0 and prior, the implementation of BaseUser.login leaks enough information to a malicious user such that they would be able to successfully generate a list of valid users on the platform. As Piccolo on its own does not also enforce strong passwords, these lists of valid accounts are likely to be used in a password spray attack with the outcome being attempted takeover of user accounts on the platform. The impact of this vulnerability is minor as it requires chaining with other attack vectors in order to gain more then simply a list of valid users on the underlying platform. The likelihood of this vulnerability is possible as it requires minimal skills to pull off, especially given the underlying login functionality for Piccolo based sites is open source. This issue has been patched in version 0.121.0.
- Record
CVE-2023-41885- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-204
- Updated
- 2026-11-02
OSVGHSA-h7cm-mrvq-wcfr
5.3
Piccolo's current `BaseUser.login` implementation is vulnerable to time based user enumeration
Summary
Short summary of the problem. Make the impact and severity as clear as possible. For example: An unsafe deserialization vulnerability allows any unauthenticated user to execute arbitrary code on the server.
The current implementation of BaseUser.login leaks enough information to a malicious user such that they would be able to successfully generate a list of valid users on the platform. As Piccolo on it's own does not also enforce strong passwords (see here), these lists of valid accounts are likely to be used in a password spray attack with the outcome being attempted takeover of user accounts on the platform.
The impact of this vulnerability is minor as it requires chaining with other attack vectors in order to gain more then simply a list of valid users on the underlying platform. The likelihood of this vulnerability is possible as it requires minimal skills to pull off especially given the underlying login functionality for Piccolo based sites is open source.
Details
Give all details on the vulnerability. Pointing to the incriminated source code is very helpful for the maintainer.
This vulnerability relates to this code. Specifically the fact that responses are not returned in constant time, but rather are based off the internal state.
For example, if a user does not exist then None is returned immediately instead of encountering a time expensive hash comparison (Line 225). This discrepancy allows a malicious user to time requests made in order to generate a list of usernames which are valid on the underlying platform for usage in further attacks.
If your curious for some more information regarding this attack avenue, I wrote a blog post awhile back with a similar chain to this with some other types of analysis. It lives here.
PoC
Complete instructions, including specific configuration details, to reproduce the vulnerability.
Piccolo Setup
- In a fresh environment
pip install 'piccolo[all]'andpiccolo asgi new - For simplified testing purposes, in
piccolo_conf.pymodify Piccolo to use SQLite:
from piccolo.engine.sqlite import SQLiteEngine
DB = SQLiteEngine()
- In the same file, add the required apps for session authentication. The file should look like the following:
from piccolo.engine.sqlite import SQLiteEngine
from piccolo.conf.apps import AppRegistry
DB = SQLiteEngine()
APP_REGISTRY = AppRegistry(
apps=[
"home.piccolo_app",
"piccolo_admin.piccolo_app",
"piccolo_api.session_auth.piccolo_app",
"piccolo.apps.user.piccolo_app",
]
)
- Run the following migrations:
piccolo migrations forwards user
piccolo migrations forwards session_auth
- Within
app.py, mountsession_loginat the/loginpath as follows:
from piccolo_api.session_auth.endpoints import session_login
app.mount("/login", session_login())
- Create a new user using
piccolo user create, making a note of the username and password for later steps.
Exploitation
The following Python script can be used to reproduce this issue. It could also be expanded to easily take in user lists to conduct user enumeration at scale, however, that is outside the scope of this report.
import asyncio
import time
from collections import defaultdict
import httpx
number_of_attempts = 50
# Set this to the username from step 6.
valid_username = "skelmis"
invalid_username = "invalid"
data = defaultdict(lambda: [])
# Ensure this points to your current enviroment
local_base_url = "http://127.0.0.1:8000"
# Set this to the password from step 6.
valid_password = "disobey-blunt-kindly-postbox-tarantula"
invalid_password = "cabana-polar-secrecy-neurology-pacific"
async…
- Record
GHSA-h7cm-mrvq-wcfr- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-203, CWE-204
- Updated
- 2026-11-02
OSVPYSEC-2023-173
5.3
Piccolo is an ORM and query builder which supports asyncio. In versions 0.120.0 and prior, the implementation of BaseUser.login leaks enough information to a malicious user such that they would be able to successfully generate a list of valid users on the platform. As Piccolo on its own does not also enforce strong passwords, these lists of valid accounts are likely to be used in a password spray attack with the outcome being attempted takeover of user accounts on the platform. The impact of this vulnerability is minor as it requires chaining with other attack vectors in order to gain more then simply a list of valid users on the underlying platform. The likelihood of this vulnerability is possible as it requires minimal skills to pull off, especially given the underlying login functionality for Piccolo based sites is open source. This issue has been patched in version 0.121.0.
- Record
PYSEC-2023-173- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
piccoloPyPI |
through 0.120.0 | 0.121.0 |
piccoloPyPI |
before 0.121.0, plus listed versions 0.1.00.1.10.1.20.10.00.10.1 Show 45 moreShow less0.10.20.10.30.10.40.10.50.10.60.10.70.10.80.100.00.101.00.102.00.103.00.104.00.105.00.106.00.107.00.108.00.109.00.11.00.11.10.11.20.11.30.11.40.11.50.11.60.11.70.11.80.110.00.111.00.111.10.112.00.112.10.113.00.114.00.115.00.116.00.117.00.118.00.119.00.12.00.12.10.12.20.12.30.12.40.12.50.12.6 |
0.121.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-41885 is a medium vulnerability (CVSS 5.3) in Piccolo-orm Piccolo, published September 12, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.56%, the 46th percentile. Fixed in piccolo 0.121.0.
References
github.com/piccolo-orm/piccolo/security/advisories/GHSA-h7cm-mrvq-wcfr
github.com/piccolo-orm/piccolo/commit/edcfe3568382922ba3e3b65896e6e7272f972261
nvd.nist.gov/vuln/detail/CVE-2023-41885
github.com/pypa/advisory-database/tree/main/vulns/piccolo/PYSEC-2023-173.yaml
github.com/advisories/GHSA-h7cm-mrvq-wcfr
github.com/CVEProject/cvelistV5/tree/main/cves/2023/41xxx/CVE-2023-41885.json
github.com/piccolo-orm/piccolo
Left out here: 190 versions and the rest of 2 source descriptions. The JSON record has them.