Advisory

GHSA-rchw-322g-f7rm

Also known as: CVE-2026-28279, GO-2026-4579

Summary

osctrl is Vulnerable to OS Command Injection via Environment Configuration

Details

Summary
An OS command injection vulnerability exists in the osctrl-admin environment configuration. An authenticated administrator can inject arbitrary shell commands via the hostname parameter when creating or editing environments. These commands are embedded into enrollment one-liner scripts generated using Go's text/template package (which does not perform shell escaping) and execute on every endpoint that enrolls using the compromised environment.

Impact
An attacker with administrator access can achieve remote code execution on every endpoint that enrolls using the compromised environment. Commands execute as root/SYSTEM (the privilege level used for osquery enrollment) before osquery is installed, leaving no agent-level audit trail. This enables backdoor installation, credential exfiltration, and full endpoint compromise.

Patches
Fixed in osctrl v0.5.0. Users should upgrade immediately.

Workarounds
Restrict osctrl administrator access to trusted personnel. Review existing environment configurations for suspicious hostnames. Monitor enrollment scripts for unexpected commands.

Credits

Leon Johnson and Kwangyun Keum from TikTok USDS JV Offensive Security Operations (Offensive Privacy Team)

https://github.com/Kwangyun → @Kwangyun
https://github.com/sho-luv → @sho-luv

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-02-28 02:05 UTC
Modified
2026-03-23 04:56 UTC

Affected packages and fixes

github.com/jmpsec/osctrl

Go · All systems

Affected

  • introduced 0, fixed 0.5.0 (semver)

Fixed versions

0.5.0

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences