{"id":"GHSA-3w8v-2pjp-5r8p","aliases":["DHI-2g6p-lnna-qki2-4jf4"],"status":"published","description":"### Summary\n\nThe optional `imjournal` input copies the journal fields\n`SYSLOG_IDENTIFIER` and `SYSLOG_PID` into rsyslog's `syslogtag`. systemd-journald\ndoes not validate these client-supplied, non-underscore fields and permits binary\nfield values. A local unprivileged process that can submit an entry to the\nsystem journal can therefore place line feeds and other control bytes in the\ntag. imjournal sanitizes NUL bytes in these values, but does not neutralize\nother control bytes; the message sanitizer applies to `MESSAGE`, not the tag.\n\nWhen a configured action renders `%syslogtag%` into a line-oriented format, one\njournal entry can produce multiple physical log lines. With the built-in\nforward format and default LF-delimited TCP framing, an embedded LF can also end\nthe first frame. A downstream syslog receiver then parses the remaining bytes as\nan independent record with attacker-chosen PRI, timestamp, short hostname, and\nmessage body.\n\nThe trusted `_PID` fallback is derived from sender credentials and is not a\nclient-controlled injection source. `_COMM` is also a trusted journald field.\nAlthough a process may choose its task name, LF injection through `_COMM` was not\nreproduced on systemd 255 and is not part of the confirmed vector.\n\n### Affected configurations and prerequisites\n\n- rsyslog loads `imjournal` and consumes the system journal.\n- The attacker is a local low-privilege process permitted to submit journal\n  entries. This is normally available through the native journal socket.\n- The output template renders the tag without control-character escaping. The\n  built-in file and forward formats do so.\n- Creation of a separate downstream record additionally requires a\n  delimiter-based transport/receiver path, such as the default LF-delimited\n  `omfwd` TCP framing demonstrated here. Octet-counted framing or a safely\n  escaping template changes that effect.\n\n### Impact\n\nThis is a log-integrity vulnerability. A local user can make one journal entry\nappear as multiple local file lines and, under the demonstrated default TCP\nforwarding path, as a neighboring syslog record at a collector. The injected\nrecord can claim a different facility/severity, timestamp, short hostname, and\nprogram/message text.\n\nLocal clients can already submit arbitrary message text and plausible program\nidentifiers. The additional security effect is crossing the record boundary and\nforging metadata that would normally be supplied by rsyslog's output template.\nNo confidentiality, memory-safety, log-deletion, or availability impact was\ndemonstrated.\n\n### Technical details\n\nOn affected versions, `readjournal()` obtains `SYSLOG_IDENTIFIER` and\n`SYSLOG_PID`, passes each through `sanitizeValue()`, and assembles the tag with\n`asprintf()`. `sanitizeValue()` replaces only NUL. `enqMsg()` calls\n`parser.SanitizeMsg()` for the raw `MESSAGE` and then separately calls\n`MsgSetTAG()` with the unsafely assembled tag.\n\nOn fresh public main `a6c1f4023df4f4e783158ea3837796dc0ef45e4e`, a UID-1000\nprocess submitted one live journal entry containing LF in both fields. The\ndefault file template produced multiple physical lines. A fresh-main sender and\nreceiver using default TCP forwarding produced two receiver messages from that\nsingle entry; the second raw frame began:\n\n```text\n\u003c34\u003eNov 14 00:00:00 forge CODEX-GHSA-3W8V-20261114\n```\n\n### Affected versions\n\nThe identifier-to-tag path was introduced by commit\n`289e54fdb5d4ebf722425982ff54d7c96132e306` and first appeared in tag\n`v7.3.11` (first stable series release `v7.4.0`). The PID component was added by\n`1e3167f227e8e5f94f8c103031ed4fd01731c968`. The NUL-only sanitizer added in\n`e33c8ffaeca79f1860ce048cf0addcdc23d91c22` did not address other control\nbytes. The behavior remains present on current public main.\n\n### Resolution and workarounds\n\nUpdate to the patched disclosure-day daily-stable build listed in this\nadvisory when available. The fix neutralizes control bytes before journal-derived\nidentifier and PID values are assembled into the tag and adds regression tests\nfor both fields.\n\nUntil then, operators can reduce exposure by using an output template that\nescapes or replaces control bytes in tag-derived properties and by using\noctet-counted forwarding where supported. Restricting which local processes may\nsubmit journal entries also reduces exposure. Octet-counted forwarding prevents\nthe demonstrated frame split but does not by itself make multiline local file\noutput safe.\n\n### Acknowledgements\n\nFound and reported by Rainer Gerhards during an internal imjournal security\nreview. The internal audit, reproducer preparation, and draft text used AI\nassistance; Rainer Gerhards retains sole ownership of the maintainer validation\nand disclosure.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"published":"2026-12-02T14:27:24Z","modified":"2026-12-04T16:45:24Z","affected":[{"source":"osv","ecosystem":"Docker Hardened Images:Debian:13","package":"ascender-25","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"25.6.3-0"}]}],"versions":["25.6.3-0","25.6.3-1","25.6.3-10","25.6.3-11","25.6.3-12","25.6.3-2","25.6.3-3","25.6.3-4","25.6.3-5","25.6.3-6","25.6.3-7","25.6.3-8","25.6.3-9"]}],"references":[{"url":"https://scout.docker.com/v/DHI-2g6p-lnna-qki2-4jf4","tags":["advisory"]},{"url":"https://github.com/rsyslog/rsyslog/security/advisories/GHSA-3w8v-2pjp-5r8p","tags":["advisory"]}],"sources":{"osv":[{"id":"DHI-2g6p-lnna-qki2-4jf4","upstream":["GHSA-3w8v-2pjp-5r8p"],"title":"### Summary","description":"### Summary\n\nThe optional `imjournal` input copies the journal fields\n`SYSLOG_IDENTIFIER` and `SYSLOG_PID` into rsyslog's `syslogtag`. systemd-journald\ndoes not validate these client-supplied, non-underscore fields and permits binary\nfield values. A local unprivileged process that can submit an entry to the\nsystem journal can therefore place line feeds and other control bytes in the\ntag. imjournal sanitizes NUL bytes in these values, but does not neutralize\nother control bytes; the message sanitizer applies to `MESSAGE`, not the tag.\n\nWhen a configured action renders `%syslogtag%` into a line-oriented format, one\njournal entry can produce multiple physical log lines. With the built-in\nforward format and default LF-delimited TCP framing, an embedded LF can also end\nthe first frame. A downstream syslog receiver then parses the remaining bytes as\nan independent record with attacker-chosen PRI, timestamp, short hostname, and\nmessage body.\n\nThe trusted `_PID` fallback is derived from sender credentials and is not a\nclient-controlled injection source. `_COMM` is also a trusted journald field.\nAlthough a process may choose its task name, LF injection through `_COMM` was not\nreproduced on systemd 255 and is not part of the confirmed vector.\n\n### Affected configurations and prerequisites\n\n- rsyslog loads `imjournal` and consumes the system journal.\n- The attacker is a local low-privilege process permitted to submit journal\n  entries. This is normally available through the native journal socket.\n- The output template renders the tag without control-character escaping. The\n  built-in file and forward formats do so.\n- Creation of a separate downstream record additionally requires a\n  delimiter-based transport/receiver path, such as the default LF-delimited\n  `omfwd` TCP framing demonstrated here. Octet-counted framing or a safely\n  escaping template changes that effect.\n\n### Impact\n\nThis is a log-integrity vulnerability. A local user can make one journal entry\nappear as multiple local file lines and, under the demonstrated default TCP\nforwarding path, as a neighboring syslog record at a collector. The injected\nrecord can claim a different facility/severity, timestamp, short hostname, and\nprogram/message text.\n\nLocal clients can already submit arbitrary message text and plausible program\nidentifiers. The additional security effect is crossing the record boundary and\nforging metadata that would normally be supplied by rsyslog's output template.\nNo confidentiality, memory-safety, log-deletion, or availability impact was\ndemonstrated.\n\n### Technical details\n\nOn affected versions, `readjournal()` obtains `SYSLOG_IDENTIFIER` and\n`SYSLOG_PID`, passes each through `sanitizeValue()`, and assembles the tag with\n`asprintf()`. `sanitizeValue()` replaces only NUL. `enqMsg()` calls\n`parser.SanitizeMsg()` for the raw `MESSAGE` and then separately calls\n`MsgSetTAG()` with the unsafely assembled tag.\n\nOn fresh public main `a6c1f4023df4f4e783158ea3837796dc0ef45e4e`, a UID-1000\nprocess submitted one live journal entry containing LF in both fields. The\ndefault file template produced multiple physical lines. A fresh-main sender and\nreceiver using default TCP forwarding produced two receiver messages from that\nsingle entry; the second raw frame began:\n\n```text\n\u003c34\u003eNov 14 00:00:00 forge CODEX-GHSA-3W8V-20261114\n```\n\n### Affected versions\n\nThe identifier-to-tag path was introduced by commit\n`289e54fdb5d4ebf722425982ff54d7c96132e306` and first appeared in tag\n`v7.3.11` (first stable series release `v7.4.0`). The PID component was added by\n`1e3167f227e8e5f94f8c103031ed4fd01731c968`. The NUL-only sanitizer added in\n`e33c8ffaeca79f1860ce048cf0addcdc23d91c22` did not address other control\nbytes. The behavior remains present on current public main.\n\n### Resolution and workarounds\n\nUpdate to the patched disclosure-day daily-stable build listed in this\nadvisory when available. The fix neutralizes control bytes before journal-derived\nidentifier and PID values are assembled into the tag and adds regression tests\nfor both fields.\n\nUntil then, operators can reduce exposure by using an output template that\nescapes or replaces control bytes in tag-derived properties and by using\noctet-counted forwarding where supported. Restricting which local processes may\nsubmit journal entries also reduces exposure. Octet-counted forwarding prevents\nthe demonstrated frame split but does not by itself make multiline local file\noutput safe.\n\n### Acknowledgements\n\nFound and reported by Rainer Gerhards during an internal imjournal security\nreview. The internal audit, reproducer preparation, and draft text used AI\nassistance; Rainer Gerhards retains sole ownership of the maintainer validation\nand disclosure.\n","status":"published","published":"2026-12-02T14:27:24Z","modified":"2026-12-04T16:45:24.41329747Z","updated_at":"2026-12-04T17:18:58.764469Z"}]}}
