Skip to content
RCE Disclosed report Intermediate CVE-2024-1354

Management Console Editor Privilege Escalation to Root SSH Access in GitHub Enterprise Server via RCE in syslog-ng

A command injection flaw existed in the syslog-ng configuration handling of GitHub Enterprise Server. An attacker holding the editor role in the Management Console could exploit it to gain admin SSH access to the appliance.

inspector-ambitious Follow

Originally disclosed on HackerOne

  • Triaged in 18 days
  • Fixed in 2 months
  • Paid in 2 months
  • Disclosed after 8 months

Summary by the program

A command injection vulnerability was identified in GitHub Enterprise Server that allowed an attacker with an editor role in the Management Console to gain admin SSH access to the appliance via the syslog-ng configuration file. Exploitation of this vulnerability required access to the GitHub Enterprise Server instance and access to the Management Console with the editor role. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.12 and was fixed in versions 3.11.5, 3.10.7, 3.9.10, and 3.8.15. This vulnerability was reported via the GitHub Bug Bounty program.

The original report as published on HackerOne, by inspector-ambitious. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

This is a command injection vulnerability in GitHub Enterprise Server (GHES). The affected feature is the Management Console, the administrative interface used to configure the appliance. The attacker needs two things: access to the GHES instance, and an account on the Management Console with the editor role. With those, an editor could escalate to admin SSH access to the appliance by way of the syslog-ng configuration file.

The report is short and gives no request, payload or command. It does not describe the individual steps the researcher took, the exact field or file that carried the injection, or the response that confirmed it. What it does state is the chain: editor role in the Management Console, injection through the syslog-ng configuration, and the result of admin SSH access to the underlying appliance.

The vulnerability affected all versions of GitHub Enterprise Server prior to 3.12. It was fixed in 3.11.5, 3.10.7, 3.9.10 and 3.8.15. The report was submitted through the GitHub Bug Bounty program. The platform records the severity as high and the weakness as generic command injection. No bounty amount is given.

Root cause

The report does not describe the root cause beyond naming the syslog-ng configuration file as the vector. syslog-ng configuration is a language of its own, and it can reference external programs. If a value from the web interface is placed into the configuration text, an editor can break out of the intended value and add configuration that runs a command.

Impact

An attacker who already holds the editor role in the Management Console can turn that limited administrative position into admin SSH access to the appliance itself. That is a privilege escalation from a web console role to shell access on the host. The report is explicit about the preconditions: the attacker must already have access to the GHES instance and the editor role in the Management Console. It does not claim that an unauthenticated attacker or a lower-privileged user can do this.

How this kind of bug works

Command injection happens when untrusted input reaches a place where it is interpreted as part of a command. The classic form is a shell call built by string concatenation, where a metacharacter such as a semicolon, pipe, backtick or $() ends the intended command and starts a new one. A second, less obvious form appears in configuration files for daemons that can execute programs. Many logging, monitoring and scheduling tools accept configuration that names an external command to run on an event. If a web interface writes user input into such a configuration without escaping, the input becomes configuration syntax rather than data.

The reason it happens is a missing boundary between data and code. The application treats a value as a plain string but the downstream consumer treats it as a program. Defences are the usual ones: avoid passing user input to a shell at all, use argument arrays rather than command strings, validate input against a strict allowlist, and escape or reject characters that are meaningful to the target configuration language. Running the daemon with least privilege limits the damage when prevention fails.

How to test for it

  1. Map the features that write configuration. In an appliance or admin console, look for settings that are saved to a file and applied by a service: logging destinations, alerting hooks, backup scripts, mail relays, syslog targets.
  2. Identify which fields are free text and which are constrained. Free-text fields that end up in a config file are the interesting ones.
  3. Send a benign marker first. Put a unique string in the field, save, and find where it lands in the generated configuration if you can read it. This confirms the data flow before you try anything.
  4. Probe for interpretation with harmless syntax. Use characters that are meaningful to the target language, such as quotes, semicolons, newlines or comment markers, and observe whether the saved configuration changes shape or the service fails to reload. A parse error caused by your input is a strong signal that the value is being interpreted.
  5. Escalate carefully to a proof. Aim for a command that writes a marker file or makes an outbound request you control, rather than anything destructive. Confirm execution through the side effect, not through an error message alone.
  6. Check the privilege of the executing process. If the daemon runs as root, the finding is a privilege escalation; if it runs unprivileged, the impact is lower and should be described as such.

Common false positives: input that is escaped correctly but still appears in the file, errors that come from validation rather than interpretation, and commands that appear to run only because a scheduled job picked up a file you wrote by other means. Always tie execution to your specific input.

How it is fixed

The standard fixes are to stop building configuration by string concatenation, escape values according to the target language, and validate input against an allowlist of expected characters. Where the configuration format allows it, avoid features that execute external programs entirely. The vulnerability was fixed in 3.11.5, 3.10.7, 3.9.10 and 3.8.15; upgrading to a fixed release is the remediation for operators. Running the affected daemon with reduced privileges is a useful defence in depth.

Hunting notes

This class hides in administrative surfaces: appliance consoles, logging and monitoring configuration, alerting integrations, and anything that generates a file consumed by a privileged service. Recon signals include admin panels that expose raw configuration, features that mention syslog, SMTP, webhooks or scripts, and error messages that reveal a config parser. Be explicit about preconditions, because a privilege escalation from an editor role is judged differently from an unauthenticated injection, and reviewers will check that the starting position is realistic.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

This report describes a security flaw in GitHub Enterprise Server, often shortened to GHES. GHES is the version of GitHub that a company can run on its own servers, inside its own network, instead of using github.com. It comes with an administrative area called the Management Console.

The flaw is a command injection. To understand that, imagine a form where you type your name, and the system later pastes that name into a set of instructions for a machine. If you type an ordinary name, all is well. If you type something cleverly crafted, the machine may read part of your text as a new instruction rather than as a name. That is command injection: user input is treated as a command instead of as harmless data.

In this case the input travels through the syslog-ng configuration file. syslog-ng is a logging program: it collects log messages (records of what a system is doing) and decides where to send them. It is configured through a configuration file. If the Management Console writes an editor's text into that file without cleaning it first, the editor can slip in extra configuration that runs a command.

The attacker in this scenario needs two things: access to the GHES instance, and an account on the Management Console with the editor role. The editor role is a limited administrative position, not full control. By abusing the injection, an editor could climb from that limited role to admin SSH access to the appliance. SSH is the standard way to open a command-line session on a remote machine; admin SSH access means a full command shell with the highest privileges on the underlying server. So the chain is: limited web console role, injection through the syslog-ng configuration, full shell on the machine.

The report itself is brief. It gives no request, no payload and no command, and it does not describe the individual steps the researcher took, the exact field or file that carried the injection, or the response that confirmed it. What it does state is the chain above, the affected versions and the fix.

The vulnerability affected all versions of GitHub Enterprise Server prior to 3.12. It was fixed in versions 3.11.5, 3.10.7, 3.9.10 and 3.8.15. The report was submitted through the GitHub Bug Bounty program, a scheme where companies pay researchers for finding and reporting flaws responsibly. The platform records the severity as high and the weakness as generic command injection. No bounty amount is given.

Why the root cause matters

The report does not describe the root cause beyond naming the syslog-ng configuration file as the vector. Sanitisation means cleaning input so that dangerous characters lose their special meaning; escaping means marking those characters so the receiving program treats them as plain text.

syslog-ng configuration is a language of its own, and it can reference external programs. If a value from the web interface is dropped into the configuration text, an editor can break out of the intended value and add configuration that runs a command.

Impact

An attacker who already holds the editor role in the Management Console can turn that limited administrative position into admin SSH access to the appliance itself. That is a privilege escalation: moving from a lower level of access to a higher one. The report is explicit about the preconditions: the attacker must already have access to the GHES instance and the editor role in the Management Console. It does not claim that an unauthenticated attacker, or a user with less access, can do this.

In general, how this kind of bug works

Command injection happens when untrusted input reaches a place where it is interpreted as part of a command. The classic form is a shell call built by gluing strings together, where a metacharacter such as a semicolon, pipe, backtick or $() ends the intended command and starts a new one. Think of a sentence where someone adds a full stop and then a second instruction: the reader follows both.

A second, less obvious form appears in configuration files for daemons, which are background programs that keep running and wait for work. Many logging, monitoring and scheduling tools accept configuration that names an external command to run on an event. If a web interface writes user input into such a configuration without escaping, the input becomes configuration syntax rather than data.

The reason it happens is a missing boundary between data and code. The application treats a value as a plain string, but the downstream consumer treats it as a program. Defences are the usual ones: avoid passing user input to a shell at all, use argument arrays rather than command strings, validate input against a strict allowlist (a list of permitted values), and escape or reject characters that are meaningful to the target configuration language. Running the daemon with least privilege, meaning only the permissions it truly needs, limits the damage when prevention fails.

How to test for it

  1. Map the features that write configuration. In an appliance or admin console, look for settings that are saved to a file and applied by a service: logging destinations, alerting hooks, backup scripts, mail relays, syslog targets.
  2. Identify which fields are free text and which are constrained. Free-text fields that end up in a config file are the interesting ones.
  3. Send a benign marker first. Put a unique string in the field, save, and find where it lands in the generated configuration if you can read it. This confirms the data flow before you try anything.
  4. Probe for interpretation with harmless syntax. Use characters that are meaningful to the target language, such as quotes, semicolons, newlines or comment markers, and observe whether the saved configuration changes shape or the service fails to reload. A parse error caused by your input is a strong signal that the value is being interpreted.
  5. Escalate carefully to a proof. Aim for a command that writes a marker file or makes an outbound request you control, rather than anything destructive. Confirm execution through the side effect, not through an error message alone.
  6. Check the privilege of the executing process. If the daemon runs as root, the finding is a privilege escalation; if it runs unprivileged, the impact is lower and should be described as such.

Common false positives: input that is escaped correctly but still appears in the file, errors that come from validation rather than interpretation, and commands that appear to run only because a scheduled job picked up a file you wrote by other means. Always tie execution to your specific input.

How it is fixed

The standard fixes are to stop building configuration by string concatenation, escape values according to the target language, and validate input against an allowlist of expected characters. Where the configuration format allows it, avoid features that execute external programs entirely. The vulnerability was fixed in 3.11.5, 3.10.7, 3.9.10 and 3.8.15; upgrading to a fixed release is the remediation for operators. Running the affected daemon with reduced privileges is a useful defence in depth.

Hunting notes

This class hides in administrative surfaces: appliance consoles, logging and monitoring configuration, alerting integrations, and anything that generates a file consumed by a privileged service. Recon signals include admin panels that expose raw configuration, features that mention syslog, SMTP, webhooks or scripts, and error messages that reveal a config parser. Be explicit about preconditions, because a privilege escalation from an editor role is judged differently from an unauthenticated injection, and reviewers will check that the starting position is realistic.

Glossary

  • GitHub Enterprise Server (GHES): the self-hosted edition of GitHub that a company runs on its own infrastructure.
  • Management Console: the administrative web interface used to configure a GHES appliance.
  • Editor role: a limited administrative account on the Management Console, below full administrator.
  • Command injection: a flaw where untrusted input is interpreted as part of a command and executed.
  • syslog-ng: a logging program that collects log messages and routes them according to a configuration file.
  • Configuration file: a text file that tells a program how to behave.
  • Sanitisation: cleaning input so dangerous characters lose their special meaning.
  • Escaping: marking characters so the receiving program treats them as plain text rather than syntax.
  • Privilege escalation: gaining a higher level of access than the one you started with.
  • SSH: a protocol for opening a command-line session on a remote machine.
  • Admin SSH access: a remote shell with the highest privileges on the underlying server.
  • Daemon: a background program that keeps running and waits for work.
  • Least privilege: giving a program or user only the permissions it genuinely needs.
  • Allowlist: a list of values or characters that are explicitly permitted.
  • False positive: a finding that looks like a vulnerability but is not.
  • Bug bounty program: a scheme where companies pay researchers for responsibly reporting security flaws.
  • Severity: a rating of how serious a vulnerability is.
  • Remediation: the action that fixes or mitigates a vulnerability, here upgrading to a fixed release.

More by inspector-ambitious

View all

15 more disclosed reports, best first.

More from GitHub

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.