CVE-2022-23305CWE-89

SQL injection in JDBC Appender in Apache Log4j V1

Critical · published January 18, 2022

Patch now

High probability of exploitation

CVSS calls it critical at 9.8. It sits in the 99.3th percentile for exploit probability.

CVSS v3.1
9.8
EPSS
67%
Percentile
99.3
In the wild
Unconfirmed
What it is

🔥 A crafty SQL injection is lurking in Log4j 1.2.x if you’re using the JDBCAppender! An attacker could easily manipulate your SQL just by sneaking in strings through input fields. ⚡ Think of it like a restaurant where customers can write their own orders. If the waiter doesn’t check what’s written, someone could order a whole buffet instead of their salad! This vulnerability is absolutely devastating! An attacker can run any SQL query they want, potentially accessing or altering your database without breaking a sweat. Imagine them wiping out your entire data with just a simple input field!

Put simply

Think of it like a restaurant where customers can write their own orders. If the waiter doesn’t check what’s written, someone could order a whole buffet instead of their salad! The JDBCAppender in Log4j 1.2.x accepts SQL statements as configuration parameters with message converters. Attackers can exploit this by inserting crafted strings that execute unintended SQL queries when logged.

What to do

This vulnerability is absolutely devastating! An attacker can run any SQL query they want, potentially accessing or altering your database without breaking a sweat. Imagine them wiping out your entire data with just a simple input field! Upgrade to Log4j 2 immediately, as it fixes this SQL injection issue and offers enhanced parameterized query support. If you must use Log4j 1.x, ensure the JDBCAppender isn’t configured, as it’s not set by default. Remember, Log4j 1.x has reached end of life, so moving to version 2 is a must! You've got this! Upgrade to Log4j 2 and secure your application like a pro! 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.66537 · 99.3th percentile
Weakness
CWE-89 · Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Published
2022-01-18T15:25Z
EPSS history
Timeline
  • 18 JAN 15:25Z
    SQL injection in JDBC Appender in Apache Log4j V1
    cvelistv5