# CVE-2022-41862: Information disclosure in postgresql

> A malicious server can cause libpq clients to leak uninitialized memory bytes during Kerberos authentication, potentially exposing sensitive data.

- **Severity:** Low 3.7 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Mar 2023
- **Updated:** 7 Mar 2025
- **Also known as:** ALPINE-CVE-2022-41862, ALSA-2023:6429, ALSA-2023:7016, BIT-postgresql-2022-41862, CLEANSTART-2026-NR73555, CLSA-2026-1785316580, DEBIAN-CVE-2022-41862, ECHO-2a2d-e9da-5962, GHSA-fr68-cm8v-7vv6, JLSEC-2026-39, MGASA-2023-0064, RHSA-2023:6429, RHSA-2023:7016, RLSA-2023:7016, SUSE-SU-2023:0390-1, SUSE-SU-2023:0391-1, SUSE-SU-2023:0392-1, SUSE-SU-2023:0393-1, SUSE-SU-2023:0450-1, SUSE-SU-2023:0479-1, SUSE-SU-2023:0569-1, SUSE-SU-2023:0583-1, SUSE-SU-2023:0705-1, UBUNTU-CVE-2022-41862, USN-5906-1, openSUSE-SU-2024:12677-1, openSUSE-SU-2024:12678-1, openSUSE-SU-2024:12679-1, openSUSE-SU-2024:12680-1

## What is CVE-2022-41862?

CVE-2022-41862 is a low-severity vulnerability in Fedoraproject Fedora, published on 3 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

In PostgreSQL, a modified, unauthenticated server can send an unterminated string during the establishment of Kerberos transport encryption. In certain conditions a server can cause a libpq client to over-read and report an error message containing uninitialized bytes.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2022-41862?

1 open source package ship an affected version, including postgresql. It affects 6 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `postgresql` | Bitnami | From 12.0.0 | 12.14.0, 13.10.0, 14.7.0, 15.2.0 |
| `libpq` | AlmaLinux:8 | All versions | 13.11-1.el8.alma.1 |
| `libpq-devel` | AlmaLinux:8 | All versions | 13.11-1.el8.alma.1 |
| `libpq` | AlmaLinux:9 | All versions | 13.11-1.el9 |
| `libpq-devel` | AlmaLinux:9 | All versions | 13.11-1.el9 |
| `libpq` | Red Hat:enterprise_linux:8::appstream | All versions | 0:13.11-1.el8 |
| `libpq-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:13.11-1.el8 |
| `libpq-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:13.11-1.el8 |
| `libpq-devel` | Red Hat:enterprise_linux:8::appstream | All versions | 0:13.11-1.el8 |
| `libpq-devel-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:13.11-1.el8 |
| `libpq` | Red Hat:enterprise_linux:9::appstream | All versions | 0:13.11-1.el9 |
| `libpq-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:13.11-1.el9 |
| `libpq-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:13.11-1.el9 |
| `libpq-devel` | Red Hat:enterprise_linux:9::appstream | All versions | 0:13.11-1.el9 |
| `libpq-devel-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:13.11-1.el9 |
| `libpq` | Rocky Linux:8 | All versions | 0:13.11-1.el8 |
| `postgresql12` | SUSE:Enterprise Storage 7 | All versions | 12.14-150200.8.41.1 |
| `postgresql13` | SUSE:Enterprise Storage 7 | All versions | 13.10-150200.5.37.1 |
| `postgresql14` | SUSE:Enterprise Storage 7 | All versions | 14.7-150200.5.23.1 |
| `postgresql15` | SUSE:Enterprise Storage 7 | All versions | 15.2-150200.5.6.1 |
| `postgresql12` | SUSE:Enterprise Storage 7.1 | All versions | 12.14-150200.8.41.1 |
| `postgresql13` | SUSE:Enterprise Storage 7.1 | All versions | 13.10-150200.5.37.1 |
| `postgresql14` | SUSE:Enterprise Storage 7.1 | All versions | 14.7-150200.5.23.1 |
| `postgresql15` | SUSE:Enterprise Storage 7.1 | All versions | 15.2-150200.5.6.1 |
| `postgresql12` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 12.14-150100.3.37.1 |
| `postgresql12` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 12.14-150200.8.41.1 |
| `postgresql13` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 13.10-150200.5.37.1 |
| `postgresql14` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 14.7-150200.5.23.1 |
| `postgresql15` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 15.2-150200.5.6.1 |
| `postgresql12` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 12.14-150200.8.41.1 |
| `postgresql13` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 13.10-150200.5.37.1 |
| `postgresql14` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 14.7-150200.5.23.1 |
| `postgresql15` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 15.2-150200.5.6.1 |
| `postgresql12` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 12.14-150200.8.41.1 |
| `postgresql13` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 13.10-150200.5.37.1 |
| `postgresql14` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 14.7-150200.5.23.1 |
| `postgresql15` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 15.2-150200.5.6.1 |
| `postgresql14` | SUSE:Linux Enterprise Module for Basesystem 15 SP4 | All versions | 14.7-150200.5.23.1 |
| `postgresql15` | SUSE:Linux Enterprise Module for Basesystem 15 SP4 | All versions | 15.2-150200.5.6.1 |
| `postgresql13` | SUSE:Linux Enterprise Module for Legacy 15 SP4 | All versions | 13.10-150200.5.37.1 |

Products: Fedoraproject Fedora, Postgresql Postgresql, Redhat Enterprise Linux, Redhat Integration Camel K, Redhat Integration Camel Quarkus, Redhat Integration Service Registry.

## How do I fix CVE-2022-41862?

Upgrade postgresql to a fixed version for your release line: 12.14.0, 13.10.0, 14.7.0 or 15.2.0.

## Is CVE-2022-41862 being exploited?

There is no known exploitation of CVE-2022-41862 in the wild and no public exploit code.

## Other vulnerabilities in Fedoraproject Fedora

- [CVE-2024-4577](https://insights.sbomify.com/CVE-2024-4577/): PHP-CGI OS Command Injection (critical 9.8, exploited in the wild)
- [CVE-2021-39226](https://insights.sbomify.com/CVE-2021-39226/): Grafana Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2019-5544](https://insights.sbomify.com/CVE-2019-5544/): VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2024-4947](https://insights.sbomify.com/CVE-2024-4947/): Google Chromium V8 Type Confusion (critical 9.6, exploited in the wild)
- [CVE-2024-4671](https://insights.sbomify.com/CVE-2024-4671/): Google Chromium Visuals Use-After-Free (critical 9.6, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-41862 and fix it if it is affected.

What it is: CVE-2022-41862 is a low-severity vulnerability in Fedoraproject Fedora, published on 3 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-41862 in the wild and no public exploit code.

Affected packages and fixed versions:
- postgresql (Bitnami): affected from 12.0.0; fixed in 12.14.0, 13.10.0, 14.7.0, 15.2.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-41862/ (Markdown: https://insights.sbomify.com/CVE-2022-41862/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-41862
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-41862
- OSV: https://osv.dev/vulnerability/CVE-2022-41862

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-41862/
Summaries are generated and may contain mistakes; the official description above is the record.
