CVE-2022-38488
Description
logrocket-oauth2-example through 2020-05-27 allows SQL injection via the /auth/register username parameter.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
SQL injection in logrocket-oauth2-example allows unauthenticated attackers to execute arbitrary SQL commands via the username parameter.
Vulnerability
The logrocket-oauth2-example project, as of version through 2020-05-27, contains a SQL injection vulnerability in the /auth/register endpoint. The username parameter is directly concatenated into SQL queries without sanitization or parameterization, as shown in the tutorial code [1][2]. This affects any deployment using the example code from the LogRocket blog post.
Exploitation
An attacker can exploit this by sending a crafted POST request to /auth/register with a malicious username value. No authentication is required. For example, username=test';CREATE TABLE hacked()-- creates a new table, while username=test';SELECT PG_SLEEP(5)-- performs a time-based blind SQL injection [2]. The attacker only needs network access to the target server.
Impact
Successful exploitation allows the attacker to execute arbitrary SQL commands on the underlying PostgreSQL database. This can lead to data exfiltration, data modification, or denial of service. The attacker gains full control over the database, potentially compromising all stored data [2].
Mitigation
No official patch has been released for this example project, which appears unmaintained. Users should avoid using this code in production environments. The recommended mitigation is to use parameterized queries or an ORM to prevent SQL injection. The tutorial may have been updated, but the vulnerable repository remains unchanged [1][2].
AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2- logrocket/oauth2-exampledescription
- Range: <=2020-05-27
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4News mentions
0No linked articles in our index yet.