{"id":"CVE-2026-54162","aliases":["CVE-2026-54162","GHSA-x3g7-qrwc-f6c5","GO-2026-6270"],"related":[],"kind":"vulnerability","state":"published","title":"Ember: Unneutralised terminal escape/control sequences from Caddy logs injected into the operator's TUI","summary":"Ember is a real-time terminal dashboard for Caddy servers with FrankenPHP support. Prior to 1.4.2, interactive TUI row formatters pass Caddy access-log fields, particularly the request URI, through the `fitCellLeft` render helper without neutralizing terminal escape or control sequences. An unauthenticated remote client can place ANSI, OSC, or CSI control bytes in an ordinary HTTP request target. Caddy JSON-escapes those bytes, `ParseLogLine` decodes them back into raw controls, and the formatters concatenate them into `View()` output reaching `os.Stdout`. When the operator views the default `Logs` tab, the terminal interprets these sequences, allowing monitoring-dashboard spoofing, clipboard hijacking through `OSC 52`, and window-title spoofing through `OSC 0/2`. This works even with a loopback-only log listener because the input arrives through normal Caddy access logs. `Certificates` and `Routes` share secondary unneutralized render sinks. The `--json`, `--once`, and daemon `--expose` modes are unaffected because they do not render an interactive terminal. Consequences depend on the terminal emulator and usually require further operator action to escalate; this is not general-purpose remote code execution. This issue is fixed in version 1.4.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Ember is a real-time terminal dashboard for Caddy servers with FrankenPHP support. Prior to 1.4.2, interactive TUI row formatters pass Caddy access-log fields, particularly the request URI, through the `fitCellLeft` render helper without neutralizing terminal escape or control sequences. An unauthenticated remote client can place ANSI, OSC, or CSI control bytes in an ordinary HTTP request target. Caddy JSON-escapes those bytes, `ParseLogLine` decodes them back into raw controls, and the formatters concatenate them into `View()` output reaching `os.Stdout`. When the operator views the default `Logs` tab, the terminal interprets these sequences, allowing monitoring-dashboard spoofing, clipboard hijacking through `OSC 52`, and window-title spoofing through `OSC 0/2`. This works even with a loopback-only log listener because the input arrives through normal Caddy access logs. `Certificates` and `Routes` share secondary unneutralized render sinks. The `--json`, `--once`, and daemon `--expose` modes are unaffected because they do not render an interactive terminal. Consequences depend on the terminal emulator and usually require further operator action to escalate; this is not general-purpose remote code execution. This issue is fixed in version 1.4.2.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nEmber's interactive TUI renders fields taken from the monitored Caddy server's access logs — most notably the request URI — straight to the operator's terminal without neutralising terminal escape or control sequences (CWE-150). Those log fields are populated from arbitrary, unauthenticated HTTP requests, so any remote client can embed ANSI/OSC/CSI control bytes that the operator's terminal emulator interprets when the log row is displayed. The bytes survive the whole pipeline: Caddy escapes them into its JSON access log as unicode escapes, ember's `ParseLogLine` decodes them back to raw `0x1b`/`0x07` bytes, and the row formatters concatenate them into the bubbletea `View()` output with no encoding before they reach `os.Stdout`.\n\n## Impact\n\nAn **unauthenticated, remote** attacker who can send HTTP requests to the Caddy server that ember monitors can inject terminal escape sequences into the operator's TUI. The trigger is a single ordinary HTTP request with control bytes in the request target. It requires no authentication; because the payload is reflected through Caddy's normal access log, it works even when ember's log listener is bound only to loopback. When the operator views the Logs tab — ember's default, zero-config mode — the terminal emulator interprets the injected sequences. Broadly-supported, demonstrated impact includes:\n\n- **Monitoring-dashboard spoofing** — CSI cursor/erase/scroll sequences forge or hide log rows so the operator misjudges the monitored server's state.\n- **Clipboard hijacking (OSC 52)** — attacker-chosen text is written into the operator's system clipboard, staging a payload the operator may later paste into a shell.\n- **Window-title spoofing (OSC 0/2)** — to support social engineering.\n\nThe impact ceiling depends on the operator's terminal emulator and usually requires a further operator action (e.g. a paste) to fully escalate; this is not general-case RCE, though specific terminal emulators have historically escalated escape sequences further. The Certificates and Routes tabs share the same unneutralised render path as secondary sinks. The `--json`/`--once` and daemon (`--expose`) modes are not affected, as they do not render to an interactive terminal.\n\n## References\n\n- https://github.com/alexandre-daubois/ember/blob/main/internal/ui/logtable.go#L18 — the unneutralised render helper (`fitCellLeft`) and row formatters (the sink)\n- https://github.com/alexandre-daubois/ember/blob/main/internal/fetcher/lognetlistener.go — the unauthenticated TCP access-log listener (input source)\n- https://github.com/alexandre-daubois/ember/blob/main/internal/fetcher/logentry.go — `ParseLogLine`, where the JSON decode restores raw control bytes\n- https://cwe.mitre.org/data/definitions/150.html — CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences","format":"markdown","source":"ghsa"},{"lang":"en","text":"Ember has unneutralized terminal escape/control sequences from Caddy logs injected into the operator's TUI in github.com/alexandre-daubois/ember","format":"markdown","source":"go"}],"published":"2026-08-20T18:36:01.000Z","modified":"2026-10-29T19:17:22.213Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N","score":4.7,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N","score":4.7,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N","score":4.7,"rating":"MEDIUM"}],"cwes":["CWE-150"],"affected":[{"ranges":[{"version":"< 1.4.2","status":"affected"}],"vendor":"alexandre-daubois","product":"ember","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.4.2"}],"ecosystem":"Go","package":"github.com/alexandre-daubois/ember","purl":"pkg:golang/github.com/alexandre-daubois/ember","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.4.2"}],"ecosystem":"Go","package":"github.com/alexandre-daubois/ember","purl":"pkg:golang/github.com/alexandre-daubois/ember","source":"go"}],"references":[{"url":"https://github.com/alexandre-daubois/ember/security/advisories/GHSA-x3g7-qrwc-f6c5","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/alexandre-daubois/ember/commit/fcb7160e58dba58d6f9b5033cc312fdedc8c9f6b","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/alexandre-daubois/ember/releases/tag/v1.4.2","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/alexandre-daubois/ember","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-10-29T18:31:30.695Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-54162","url":"https://www.cve.org/CVERecord?id=CVE-2026-54162","licence":"CVE Terms of Use","modified":"2026-10-29T18:31:49.122Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x3g7-qrwc-f6c5","url":"https://github.com/advisories/GHSA-x3g7-qrwc-f6c5","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:54.262Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6270","url":"https://pkg.go.dev/vuln/GO-2026-6270","licence":"CC-BY-4.0","modified":"2026-08-26T01:21:30.732Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-54162","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54162","licence":"Public domain","modified":"2026-10-29T19:17:22.213Z"}],"updatedAt":"2026-11-25T22:59:47.683Z","epss":{"score":0.00265,"percentile":0.19673,"date":"2026-12-01T12:00:22.000Z"}}