/

CVE-2026-92709

Severity:

HIGH RISK

(8.1)

Path Traversal (CWE-22) in rsyslog omfile dynaFile facility

CVE-2026-92709

Awaiting Analysis

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-73

Impact:

Unauthorized File Write

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability can occur in rsyslog when the omfile dynaFile facility uses untrusted values to construct output paths without secure-path handling. An attacker who can influence such a value may cause logs to be written outside the intended directory, potentially overwriting or creating files where the rsyslog process has permission.

A path traversal vulnerability can occur in rsyslog when the omfile dynaFile facility uses untrusted values to construct output paths without secure-path handling. An attacker who can influence such a value may cause logs to be written outside the intended directory, potentially overwriting or creating files where the rsyslog process has permission.

Affected context

The issue affects rsyslog deployments that use omfile with dynaFile templates to generate dynamic output paths. The deployment becomes risky when a value influenced by untrusted input is incorporated into a path component without canonicalization, containment checks, or another secure-path control. This condition is not limited to the RFC5424 HOSTNAME field; any untrusted value reaching the template may create the exposure.

The issue affects rsyslog deployments that use omfile with dynaFile templates to generate dynamic output paths. The deployment becomes risky when a value influenced by untrusted input is incorporated into a path component without canonicalization, containment checks, or another secure-path control. This condition is not limited to the RFC5424 HOSTNAME field; any untrusted value reaching the template may create the exposure.

Exploit preconditions

  • Attack surface: rsyslog log-processing and dynamic file-output configuration
  • Required access: Ability to influence a value consumed by an omfile dynaFile template
  • Trigger point: Rendering the dynamic output path while processing a matching log message
  • Why exploitation is possible: The generated path may not remain within the intended log directory when untrusted path components are accepted without secure containment checks
  • Attack surface: rsyslog log-processing and dynamic file-output configuration
  • Required access: Ability to influence a value consumed by an omfile dynaFile template
  • Trigger point: Rendering the dynamic output path while processing a matching log message
  • Why exploitation is possible: The generated path may not remain within the intended log directory when untrusted path components are accepted without secure containment checks

Why this happens

The underlying bug class is external control of a file name or path, mapped primarily to CWE-73, together with path traversal, mapped to CWE-22. A dynaFile template is intentionally flexible, but treating attacker-influenced data as a trusted path component can allow directory-boundary assumptions to be bypassed. The insecure pattern is constructing filesystem paths from untrusted values without restricting the resulting path to an approved directory.

The underlying bug class is external control of a file name or path, mapped primarily to CWE-73, together with path traversal, mapped to CWE-22. A dynaFile template is intentionally flexible, but treating attacker-influenced data as a trusted path component can allow directory-boundary assumptions to be bypassed. The insecure pattern is constructing filesystem paths from untrusted values without restricting the resulting path to an approved directory.

Potential impact

  • Log data may be written outside the intended directory
  • Existing files could be overwritten if the rsyslog process has sufficient permissions
  • Sensitive locations may receive attacker-influenced content
  • Filesystem integrity or service availability could be affected
  • The issue could support further compromise when privileged paths are writable
  • Log data may be written outside the intended directory
  • Existing files could be overwritten if the rsyslog process has sufficient permissions
  • Sensitive locations may receive attacker-influenced content
  • Filesystem integrity or service availability could be affected
  • The issue could support further compromise when privileged paths are writable

General mitigation guidance

Mitigation generally focuses on reducing trust in values used by dynamic file templates and enforcing filesystem containment.

Common defensive patterns include:

  • Restricting dynaFile path components to approved, non-user-controlled values
  • Canonicalizing and validating the final path before opening the file
  • Enforcing that resolved paths remain below an explicitly configured log directory
  • Rejecting traversal markers, absolute paths, unexpected separators, and other invalid path forms as defense-in-depth
  • Using fixed output paths or controlled identifiers instead of raw message-derived values
  • Running rsyslog with the minimum filesystem permissions required for log collection
  • Applying filesystem isolation, dedicated log partitions, and restrictive ownership policies where practical
  • Treating dynamic path templates as security-sensitive configuration during deployment review

Mitigation generally focuses on reducing trust in values used by dynamic file templates and enforcing filesystem containment.

Common defensive patterns include:

  • Restricting dynaFile path components to approved, non-user-controlled values
  • Canonicalizing and validating the final path before opening the file
  • Enforcing that resolved paths remain below an explicitly configured log directory
  • Rejecting traversal markers, absolute paths, unexpected separators, and other invalid path forms as defense-in-depth
  • Using fixed output paths or controlled identifiers instead of raw message-derived values
  • Running rsyslog with the minimum filesystem permissions required for log collection
  • Applying filesystem isolation, dedicated log partitions, and restrictive ownership policies where practical
  • Treating dynamic path templates as security-sensitive configuration during deployment review

How teams detect issues like this

Detection can combine configuration analysis, code review, and runtime monitoring:

  • Search configuration repositories for omfile dynaFile templates containing message fields or other externally influenced values
  • Review whether every dynamic path component is constrained to an approved identifier set
  • Use static or policy analysis to flag filesystem paths assembled from untrusted log properties
  • Test path canonicalization and directory-containment behavior with security-focused configuration tests
  • Monitor rsyslog file-open activity for writes outside approved log directories
  • Alert on unexpected creation or modification of sensitive files by the rsyslog service account
  • Automated configuration review tools can help enforce approved dynamic-path patterns in CI and deployment pipelines

Detection can combine configuration analysis, code review, and runtime monitoring:

  • Search configuration repositories for omfile dynaFile templates containing message fields or other externally influenced values
  • Review whether every dynamic path component is constrained to an approved identifier set
  • Use static or policy analysis to flag filesystem paths assembled from untrusted log properties
  • Test path canonicalization and directory-containment behavior with security-focused configuration tests
  • Monitor rsyslog file-open activity for writes outside approved log directories
  • Alert on unexpected creation or modification of sensitive files by the rsyslog service account
  • Automated configuration review tools can help enforce approved dynamic-path patterns in CI and deployment pipelines

Sources

SourceLink
github.comgithub.com/rsyslog/rsyslog/security/advisories/GHSA-xmp9-244p-5ggv

Frequently asked

questions

Exploitability depends on whether an attacker can influence a value processed by the affected dynaFile template. In network-facing logging deployments, untrusted message content may provide that influence, but the exact scope depends on the configured inputs and permissions.

Not necessarily. Direct host access may not be required if externally supplied log data reaches a dynamic path component. The attacker still needs a path-influencing input and a deployment configuration that accepts it.

Avoid using untrusted values as raw path components. Prefer fixed or allowlisted identifiers, validate the resolved path against an approved directory, and run rsyslog with minimal filesystem privileges.

Treat dynamic filesystem paths as security-sensitive, review dynaFile templates during configuration changes, enforce path-containment policies, and monitor service-account writes outside designated log locations.

Exploitability depends on whether an attacker can influence a value processed by the affected dynaFile template. In network-facing logging deployments, untrusted message content may provide that influence, but the exact scope depends on the configured inputs and permissions.

Not necessarily. Direct host access may not be required if externally supplied log data reaches a dynamic path component. The attacker still needs a path-influencing input and a deployment configuration that accepts it.

Avoid using untrusted values as raw path components. Prefer fixed or allowlisted identifiers, validate the resolved path against an approved directory, and run rsyslog with minimal filesystem privileges.

Treat dynamic filesystem paths as security-sensitive, review dynaFile templates during configuration changes, enforce path-containment policies, and monitor service-account writes outside designated log locations.

Find out what's already
exploitable in your codebase.