GHSA-crhg-xgrg-vvcc a12nserver vulnerable to potential SQL Injections via Knex dependency
SQL injection in a12nserver with MySQL allows attackers to steal OAuth2 access tokens for unrelated users.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-crhg-xgrg-vvcc?
GHSA-crhg-xgrg-vvcc is a SQL injection vulnerability in @curveball/a12n-server, published on 13 Jan 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Impact
Users of a12nserver that use MySQL might be vulnerable to SQL injection bugs.
If you use a12nserver and MySQL, update as soon as possible. This SQL injection bug might let an attacker obtain OAuth2 Access Tokens for users unrelated to those that permitted OAuth2 clients.
Patches
The knex dependency has been updated to 2.4.0 in a12nserver 0.23.0
Workarounds
No further workarounds
References
Which versions are affected by GHSA-crhg-xgrg-vvcc?
2 open source packages ship an affected version, including @curveball/a12n-server.
| Package | Affected | Fixed in |
|---|---|---|
@curveball/a12n-server npm | From 0.20.0 | 0.23.0 |
@curveball/a12n-server npm | From 0.20.0 | 0.23.0 |
How do I fix GHSA-crhg-xgrg-vvcc?
Upgrade @curveball/a12n-server to 0.23.0 or later.
Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.
Is GHSA-crhg-xgrg-vvcc being exploited?
There is no known exploitation of GHSA-crhg-xgrg-vvcc in the wild and no public exploit code.