# CVE-2022-24903: Buffer overflow in TCP syslog server (receiver) components in rsyslog

> A heap buffer overflow in rsyslog's TCP syslog receiver can cause a segfault or malfunction, primarily leading to denial of service.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 May 2022
- **Updated:** 23 Apr 2025
- **Also known as:** ALPINE-CVE-2022-24903, ALSA-2022:4799, AZL-9736, CLSA-2022-1652706426, CLSA-2022-1652706523, CLSA-2022-1653917271, CLSA-2022-1654710004, CLSA-2022-1654717777, DEBIAN-CVE-2022-24903, DSA-5150-1, GHSA-ggw7-xr6h-mmr8, MGASA-2022-0165, OESA-2022-1672, RHSA-2022:4795, RHSA-2022:4799, RHSA-2022:4800, RHSA-2022:4801, RHSA-2022:4802, RHSA-2022:4803, RHSA-2022:4808, RLSA-2022:4795, RLSA-2022:4799, SUSE-SU-2022:1583-1, SUSE-SU-2022:1817-1, SUSE-SU-2022:2314-1, SUSE-SU-2022:2331-1, SUSE-SU-2022:2333-1, UBUNTU-CVE-2022-24903, USN-5404-1, USN-5404-2, openSUSE-SU-2024:12059-1

## What is CVE-2022-24903?

CVE-2022-24903 is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 5 May 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Rsyslog is a rocket-fast system for log processing. Modules for TCP syslog reception have a potential heap buffer overflow when octet-counted framing is used. This can result in a segfault or some other malfunction. As of our understanding, this vulnerability can not be used for remote code execution. But there may still be a slight chance for experts to do that. The bug occurs when the octet count is read. While there is a check for the maximum number of octets, digits are written to a heap buffer even when the octet count is over the maximum, This can be used to overrun the memory buffer. However, once the sequence of digits stop, no additional characters can be added to the buffer. In our opinion, this makes remote exploits impossible or at least highly complex. Octet-counted framing is one of two potential framing modes. It is relatively uncommon, but enabled by default on receivers. Modules `imtcp`, `imptcp`, `imgssapi`, and `imhttp` are used for regular syslog message reception. It is best practice not to directly expose them to the public. When this practice is followed, the risk is considerably lower. Module `imdiag` is a diagnostics module primarily intended for testbench runs. We do not expect it to be present on any production installation. Octet-counted framing is not very common. Usually, it needs to be specifically enabled at senders. If users do not need it, they can turn it off for the most important modules. This will mitigate the vulnerability.

Weakness: CWE-1284 (Improper Validation of Specified Quantity in Input), CWE-120 (Buffer Copy without Checking Size of Input)

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

It affects 4 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `rsyslog` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-crypto` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-doc` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-elasticsearch` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-gnutls` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-gssapi` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-kafka` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-mmaudit` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-mmfields` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-mmjsonparse` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-mmkubernetes` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-mmnormalize` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-mmsnmptrapd` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-mysql` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-omamqp1` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-openssl` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-pgsql` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-relp` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-snmp` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog-udpspoof` | AlmaLinux:8 | All versions | 8.2102.0-7.el8 |
| `rsyslog` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-crypto` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-doc` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-elasticsearch` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-gnutls` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-gssapi` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-kafka` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-libdbi` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-mmaudit` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-mmjsonparse` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-mmkubernetes` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-mmnormalize` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-mmsnmptrapd` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-mysql` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-pgsql` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-relp` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-snmp` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-udpspoof` | Red Hat:enterprise_linux:7::client | All versions | 0:8.24.0-57.el7_9.3 |
| `rsyslog-crypto` | Red Hat:enterprise_linux:7::computenode | All versions | 0:8.24.0-57.el7_9.3 |

Products: Debian Debian Linux, Fedoraproject Fedora, Netapp Active Iq Unified Manager, Rsyslog Rsyslog.

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

Upgrade to a fixed version.

## Is CVE-2022-24903 being exploited?

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

Public exploit code:

- CVE-2022-24903 Heap-based buffer overflow  (github_poc): https://github.com/andree554/CVE-2022-24903-Heap-based-buffer-overflow-Hand-On-Lab

## Other vulnerabilities in Debian Debian Linux

- [CVE-2015-3306](https://insights.sbomify.com/CVE-2015-3306/): ProFTPD Improper Access Control (critical 10.0, exploited in the wild)
- [CVE-2025-49113](https://insights.sbomify.com/CVE-2025-49113/): RoundCube Webmail Deserialization of Untrusted Data (critical 9.9, exploited in the wild)
- [CVE-2026-24061](https://insights.sbomify.com/CVE-2026-24061/): GNU InetUtils Argument Injection (critical 9.8, exploited in the wild)
- [CVE-2025-39682](https://insights.sbomify.com/CVE-2025-39682/): Linux Kernel Improper Check for Unusual or Exceptional Conditions (critical 9.8, exploited in the wild)
- [CVE-2024-9680](https://insights.sbomify.com/CVE-2024-9680/): Mozilla Firefox Use-After-Free (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

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

What it is: CVE-2022-24903 is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 5 May 2022. 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-24903 in the wild and no public exploit code.

Affected product: Debian Debian Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-24903/ (Markdown: https://insights.sbomify.com/CVE-2022-24903/index.md)
```

## Sources

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

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