CriticalGHSA-65fg-84f6-3jq3CVE-2022-23305

SQL Injection in Log4j 1.2.x

Published 21 Jan 2022 · Updated 8 Jun 2026

Is your project on an affected log4j:log4j?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
<=1.2.17
Fixed in
No fix released
Affected
<=2.0
Fixed in
No fix released

Details

By design, the JDBCAppender in Log4j 1.2.x accepts an SQL statement as a configuration parameter where the values to be inserted are converters from PatternLayout. The message converter, %m, is likely to always be included. This allows attackers to manipulate the SQL by entering crafted strings into input fields or headers of an application that are logged allowing unintended SQL queries to be executed. Note this issue only affects Log4j 1.x when specifically configured to use the JDBCAppender, which is not the default. Beginning in version 2.0-beta8, the JDBCAppender was re-introduced with proper support for parameterized SQL queries and further customization over the columns written to in logs. Apache Log4j 1.2 reached end of life in August 2015. Users should upgrade to Log4j 2 as it addresses numerous other issues from the previous versions.

Is GHSA-65fg-84f6-3jq3 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected log4j:log4j, and gives you the command that fixes it.

More advisories for log4j:log4j

  • HighCVE-2023-26464Apache Log4j 1.x (EOL) allows Denial of Service (DoS) · 10 Mar 2023
  • HighCVE-2022-23302Deserialization of Untrusted Data in Log4j 1.x · 21 Jan 2022
  • CriticalCVE-2022-23307Deserialization of Untrusted Data in Apache Log4j · 19 Jan 2022
  • HighCVE-2021-4104JMSAppender in Log4j 1.2 is vulnerable to deserialization of untrusted data · 14 Dec 2021
  • CriticalCVE-2019-17571Deserialization of Untrusted Data in Log4j · 6 Jan 2020
log4j:log4j security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.