/

CVE-2026-63442

Severity:

HIGH RISK

(8.1)

Log Injection (CWE-117) in OPNsense WebGUI Login Flow

CVE-2026-63442

Deferred

Vulnerability type

Category:

Log Injection

CWE:

CWE-117

Impact:

Authentication Control Bypass and Denial of Service

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

An improper neutralization of carriage-return and line-feed characters in the unauthenticated OPNsense WebGUI login username field allows log entries to be forged. An attacker who can reach the login page may manipulate firewall lockout events, block another IP address, or weaken brute-force protections without authenticating.

An improper neutralization of carriage-return and line-feed characters in the unauthenticated OPNsense WebGUI login username field allows log entries to be forged. An attacker who can reach the login page may manipulate firewall lockout events, block another IP address, or weaken brute-force protections without authenticating.

Affected context

The issue can occur in OPNsense deployments where unauthenticated WebGUI login input is written through the LOG_AUTH syslog path and consumed by syslog-ng-lockout.conf and lockout_handler. Risk is present when carriage-return and line-feed characters remain in the username field and the downstream line-oriented consumer interprets injected content as separate authentication events.

The issue can occur in OPNsense deployments where unauthenticated WebGUI login input is written through the LOG_AUTH syslog path and consumed by syslog-ng-lockout.conf and lockout_handler. Risk is present when carriage-return and line-feed characters remain in the username field and the downstream line-oriented consumer interprets injected content as separate authentication events.

Exploit preconditions

  • Attack surface: The unauthenticated WebGUI login page
  • Required access: Network access to submit login requests; no valid credentials are required
  • Trigger point: Processing of login failures or successes through syslog-ng and lockout_handler
  • Why exploitation is possible: Unsanitized control characters can create forged log lines that are parsed as independent authentication events, allowing attacker-controlled IP data to influence lockout handling
  • Attack surface: The unauthenticated WebGUI login page
  • Required access: Network access to submit login requests; no valid credentials are required
  • Trigger point: Processing of login failures or successes through syslog-ng and lockout_handler
  • Why exploitation is possible: Unsanitized control characters can create forged log lines that are parsed as independent authentication events, allowing attacker-controlled IP data to influence lockout handling

Why this happens

The root cause is improper neutralization of carriage-return and line-feed characters before user-controlled login data is emitted to an authentication log stream. Because the downstream consumer processes the stream line by line, injected delimiters can transform part of a username into a separately parsed event and cause attacker-controlled values to be interpreted as legitimate authentication metadata. This behavior maps to CWE-117, Improper Output Neutralization for Logs.

The root cause is improper neutralization of carriage-return and line-feed characters before user-controlled login data is emitted to an authentication log stream. Because the downstream consumer processes the stream line by line, injected delimiters can transform part of a username into a separately parsed event and cause attacker-controlled values to be interpreted as legitimate authentication metadata. This behavior maps to CWE-117, Improper Output Neutralization for Logs.

Potential impact

  • An attacker may add another IP address to the SSH lockout PF table
  • Active connections or states associated with a targeted address could be terminated
  • Administrative, DNS, gateway, or monitoring services may become unreachable
  • An attacker could reset or weaken their own brute-force failure counter
  • Authentication lockout controls could be bypassed without valid credentials
  • An attacker may add another IP address to the SSH lockout PF table
  • Active connections or states associated with a targeted address could be terminated
  • Administrative, DNS, gateway, or monitoring services may become unreachable
  • An attacker could reset or weaken their own brute-force failure counter
  • Authentication lockout controls could be bypassed without valid credentials

General mitigation guidance

Mitigation generally focuses on treating login fields as untrusted data across the entire logging pipeline. Log encoders should neutralize control characters and preserve a clear distinction between data and record delimiters. Structured logging with typed fields and unambiguous event boundaries is preferable to parsing free-form lines. Downstream consumers should validate event schemas, reject malformed or ambiguous records, and avoid trusting IP addresses or authentication outcomes solely because they appear syntactically valid. Lockout actions should apply least privilege, use narrowly scoped state changes, and include independent validation and rate controls. Input validation, centralized logging policy enforcement, and defense-in-depth protections can reduce the effect of malformed log data.

Mitigation generally focuses on treating login fields as untrusted data across the entire logging pipeline. Log encoders should neutralize control characters and preserve a clear distinction between data and record delimiters. Structured logging with typed fields and unambiguous event boundaries is preferable to parsing free-form lines. Downstream consumers should validate event schemas, reject malformed or ambiguous records, and avoid trusting IP addresses or authentication outcomes solely because they appear syntactically valid. Lockout actions should apply least privilege, use narrowly scoped state changes, and include independent validation and rate controls. Input validation, centralized logging policy enforcement, and defense-in-depth protections can reduce the effect of malformed log data.

How teams detect issues like this

Detection can include static analysis and code review checks for user-controlled values written directly to authentication or security logs without control character handling. Reviewers can trace fields from login forms through syslog configuration, line-oriented parsers, and automated response handlers. Runtime monitoring can look for unusual newline-bearing input, forged authentication events, unexpected lockout changes, and discrepancies between WebGUI activity and firewall state updates. Policy enforcement can require structured logging, schema validation, and tests covering delimiter and control-character inputs. Automated security review tools may help identify unsafe log construction and parser-boundary assumptions.

Detection can include static analysis and code review checks for user-controlled values written directly to authentication or security logs without control character handling. Reviewers can trace fields from login forms through syslog configuration, line-oriented parsers, and automated response handlers. Runtime monitoring can look for unusual newline-bearing input, forged authentication events, unexpected lockout changes, and discrepancies between WebGUI activity and firewall state updates. Policy enforcement can require structured logging, schema validation, and tests covering delimiter and control-character inputs. Automated security review tools may help identify unsafe log construction and parser-boundary assumptions.

Sources

SourceLink
github.comgithub.com/opnsense/core/commit/8bdaad95f405f4587bb83bf35aa652ca493cc2a4
github.comgithub.com/opnsense/core/commit/c930ab586ffe2d2e010e5135657e5e054316ff58
github.comgithub.com/opnsense/core/security/advisories/GHSA-2v2x-m4j7-76pv

Frequently asked

questions

Yes. An attacker generally needs network access to the unauthenticated WebGUI

login page, but does not need valid credentials.

The relevant access is the ability to submit login requests and influence the

username field. Administrative authentication is not required.

Neutralize control characters before logging, prefer structured events over

free-form lines, and validate all fields again before they reach lockout or

firewall-state handlers.

Treat log data as untrusted input, enforce explicit event schemas, test

delimiter handling across logging pipelines, and monitor security actions for

inconsistencies with originating requests.

Yes. An attacker generally needs network access to the unauthenticated WebGUI

login page, but does not need valid credentials.

The relevant access is the ability to submit login requests and influence the

username field. Administrative authentication is not required.

Neutralize control characters before logging, prefer structured events over

free-form lines, and validate all fields again before they reach lockout or

firewall-state handlers.

Treat log data as untrusted input, enforce explicit event schemas, test

delimiter handling across logging pipelines, and monitor security actions for

inconsistencies with originating requests.

Find out what's already
exploitable in your codebase.