CVE-2022-26520

In pgjdbc before 42.3.3, an attacker (who controls the jdbc URL or properties) can call java.util.logging.FileHandler to write to arbitrary files through the…

published March 7, 2022

CVSS
—
EPSS
3%
Percentile
87.3
In the wild
Unconfirmed
What it is

⚠️ A crafty attacker can use a JDBC URL to write to arbitrary files! With the right connection properties in pgjdbc versions before 42.3.3, they can sneak in and create executable files like a magician pulling bunnies out of hats. 🎩 Think of it as a restaurant where anyone can alter the menu by just mentioning a special dish — the chef takes their word for it! In the same way, if applications blindly trust JDBC properties, they leave the door open for mischief. This could lead to devastating consequences! An attacker could plant an executable JSP file in your Tomcat web root, unleashing chaos as if a rogue chef decided to serve up something unsavory. It’s a sneaky way to inject harmful files into your environment.

Put simply

Think of it as a restaurant where anyone can alter the menu by just mentioning a special dish — the chef takes their word for it! In the same way, if applications blindly trust JDBC properties, they leave the door open for mischief. The vulnerability occurs when pgjdbc allows untrusted connection properties to control the java.util.logging.FileHandler, letting an attacker specify file paths and file names, including executable code.

What to do

This could lead to devastating consequences! An attacker could plant an executable JSP file in your Tomcat web root, unleashing chaos as if a rogue chef decided to serve up something unsavory. It’s a sneaky way to inject harmful files into your environment. To protect your applications, upgrade pgjdbc to version 42.3.3 or later, and ensure that you validate and sanitize all JDBC connection properties to prevent untrusted inputs. Always be cautious about what gets added to your setup! You got this! With these steps, you’ll have your security tightened up in no time. 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.02999 · 87.3th percentile
Published
2022-03-07T17:00Z
EPSS history
Timeline
  • 07 MAR 17:00Z
    In pgjdbc before 42.3.3, an attacker (who controls the jdbc URL or properties) can call java.util.logging.FileHandler to write to arbitrary files through the…
    cvelistv5