CVE-2026-77398: LabelU: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
LabelU is a data annotation platform designed for handling multimodal data. Prior to version 1.5.3, the sort value was interpolated verbatim into an ORDER BY clause via a raw SQLAlchemy text() f-string in crudsample.listby. A route-level regex guard was intended to restrict the value to a fixed set of column:direction pairs, but Pydantic v2 applies the pattern with an unanchored re.search, so any value merely containing a valid pair (e.g. updatedat:asc,) passed validation and reached the raw SQL. Because labelU allows open self-registration, any remote attacker can obtain the authenticated role required to reach this endpoint. The flaw permits blind boolean-based extraction of arbitrary data (e.g. other users' bcrypt password hashes). This issue has been patched in version 1.5.3.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.5.3
Event History
Frequently Asked Questions
Who can realistically exploit this issue?
Any remote user who can access the affected endpoint with an authenticated role can exploit it. In deployments that allow open self-registration, an attacker can create their own account to obtain that role.
What does an attacker need to send to bypass the sort-value validation?
The attacker needs to supply a sort value that contains a permitted column:direction pair but appends SQL content after it. The route-level pattern check uses an unanchored search, so a value such as "updated_at:asc," passes validation and reaches the raw SQL query.
What data could be exposed?
The issue permits blind boolean-based SQL injection, allowing extraction of arbitrary database data. The advisory specifically identifies other users' bcrypt password hashes as an example.
Which versions are affected and what is the remediation?
LabelU versions before 1.5.3 are affected. Upgrade to version 1.5.3, which contains the patch.