CVE-2026-78002: Rsyslog: rsyslog: denial of service via heap buffer overflow in rainerscript replace() function

Published Aug 21, 2026
·
Updated

A flaw was found in rsyslog. An unauthenticated remote attacker can trigger a heap buffer overflow in the RainerScript replace() function by sending specially crafted syslog messages. This vulnerability arises from an incorrect buffer size calculation during string replacement, causing memory corruption. Successful exploitation can lead to a denial of service (DoS) for the affected system.

Other sources

doFuncReplace() in grammar/rainerscript.c implements replace(source, find, replaceWith) as two passes over the source string: pass 1 computes the output length, pass 2 allocates that many bytes with esnewStr() and fills them. On partial-match failure the two passes rewind by different amounts — pass 1 does i -= (j - 1), pass 2 does i -= j — so pass 1 resumes scanning at matchStart + 2 while pass 2 resumes at matchStart + 1. Every match that begins one byte after a failed partial match is therefore counted by pass 2 but not by pass 1. When replaceWith is longer than find, each such match makes the allocation short by lReplaceWith - lfind bytes, and pass 2 writes past the end of the buffer. Neither store site is bounds-checked. The source string is normally a message property ($msg, $rawmsg, …), so an unauthenticated remote syslog sender chooses the number of missed matches and thus the size of the overflow.

— Red Hat

Rsyslog: rsyslog: denial of service via heap buffer overflow in rainerscript replace() function

— Microsoft

Affected Software

4 affected componentsFixes available
RainerScript rsyslog
debian/rsyslog<=8.2302.0-1+deb12u1
8.2504.0-1+deb13u28.2608.0-4
Microsoft azl3 rsyslog 8.2308.0-6<8.2308.0-7
8.2308.0-7
Microsoft azl3 rsyslog 8.2308.0-7<8.2308.0-7
8.2308.0-7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 8.2308.0-7
  2. Upgrade

    Upgrade debian/rsyslog to a version that resolves this vulnerability.

    Fixed in 8.2504.0-1+deb13u2Fixed in 8.2608.0-4

Event History

Aug 21, 2026
Data Sourced
via Red Hat·07:43 PM
DescriptionSeverityAffected Software
Aug 27, 2026
CVE Published
via MITRE·04:12 PM
Data Sourced
via MITRE·04:12 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:20 PM
DescriptionSeverityWeakness
Sep 2, 2026
Data Sourced
via Microsoft·08:05 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:05 AM
Affected Software
Updated
via Microsoft·08:05 AM
DescriptionSeverity
Sep 22, 2026
Data Sourced
via Ubuntu·02:54 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via Launchpad·02:54 PM
Description
Data Sourced
via Debian·02:55 PM
DescriptionAffected Software

Frequently Asked Questions

1

What must an attacker be able to do to trigger the flaw?

The attacker must be able to send specially crafted syslog messages to the affected rsyslog instance. No authentication or user interaction is required.

2

Which configurations are exposed?

Exposure requires use of the RainerScript replace() function on attacker-influenced message content, such as message properties including $msg or $rawmsg. The overflow occurs when a failed partial match is followed one byte later by a match that is replaced with a string longer than the search string.

3

What is the expected impact of successful exploitation?

Successful exploitation can corrupt heap memory and cause a denial of service for the affected system. The provided information describes availability impact, not confidentiality or integrity impact.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203