/

CVE-2026-47685

Severity:

HIGH RISK

(7.3)

Stored XSS (CWE-79) in FOG Host Inventory Service

CVE-2026-47685

Analyzed

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Stored Cross-Site Scripting against administrators

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

FOG's unauthenticated inventory service endpoint accepts and stores client-supplied data without sanitization, and the Host Management Inventory page renders these values without output encoding.

Under these conditions, an attacker can inject stored cross-site scripting payloads that execute in any administrator's browser when viewing affected inventory data.

Affected context

This vulnerability occurs in FOG's inventory functionality where client machines submit hardware and inventory data to the /service/inventory.php endpoint.

Deployments are affected when the service:

  • Accepts arbitrary inventory field values from unauthenticated or low-trust clients
  • Persists those values directly into the database
  • Displays static inventory fields in the Host Management Inventory page without HTML output encoding

In such environments, inventory entries can become a vehicle for attacker-controlled script execution in admin browsers.

Exploit preconditions

  • Attack surface: HTTP access to the /service/inventory.php inventory service endpoint
  • Required access: Ability to submit inventory data as a FOG client or via crafted requests (no authentication on the endpoint)
  • Trigger point: An administrator or privileged user opens the Host Management Inventory page that renders the stored inventory fields
  • Why exploitation is possible: Client-supplied values are stored without sanitization and later embedded into HTML without output encoding, allowing attacker-controlled script content to run in the browser context of the management interface

Why this happens

The underlying issue is improper neutralization of untrusted data before it is included in HTML output, aligning with CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting).

The inventory service persists raw client-supplied values and the management UI directly injects these fields into the DOM without escaping or encoding.

This insecure pattern treats data as safe markup, enabling an attacker to inject script or event-handler content that executes whenever an administrator views the affected inventory record.

Potential impact

  • Attacker-controlled scripts may execute in the administrator's browser session
  • Malicious code could access or modify session data and management cookies
  • Administrative actions can be performed on behalf of the victim via UI redressing or forged requests
  • Inventory records and host configurations may be altered or deleted
  • Further compromise of the FOG management interface and lateral movement within the administrative environment could occur

General mitigation guidance

Effective mitigation focuses on treating inventory data as untrusted input at every stage.

Common defensive patterns include:

  • Applying strict output encoding for all dynamic content rendered into HTML, CSS, JavaScript, and attributes
  • Limiting allowed characters or formats for inventory fields to reduce the risk of script-like content
  • Centralizing templating and encoding logic so that UI components never concatenate raw values into markup
  • Separating data and code by avoiding inline event handlers and script blocks that mix user-controlled values
  • Running administrative interfaces in hardened browser profiles with reduced trust for active content

How teams detect issues like this

Detection can rely on both automated and manual review of the code paths that handle and render inventory data.

Useful approaches include:

  • Static analysis rules that flag direct insertion of request parameters or database fields into HTML without encoding
  • Code review checklists focused on output encoding and templating patterns in administrative pages
  • Content security policies (CSP) that help reveal unexpected inline script execution during testing
  • Integration tests that submit crafted inventory values containing script-like payloads and verify that they are safely rendered or rejected

Sources

SourceLink
github.comgithub.com/FOGProject/fogproject/security/advisories/GHSA-2r7m-6mqf-5cc4

Frequently asked

questions

Any party that can send data to the unauthenticated inventory service endpoint can plant malicious values, which then execute in the browsers of administrators or other privileged users viewing the affected inventory records.

No, exploitation targets an unauthenticated service endpoint. However, impact is realized when an authenticated administrator accesses the Host Management Inventory page that renders the stored data.

The broad fix is to enforce robust output encoding on every dynamic value rendered into HTML and to ensure that stored data is treated as untrusted, combined with tighter validation of incoming inventory fields.

Adopting a secure templating framework that automatically encodes output, enforcing coding standards that prohibit direct HTML concatenation with user input, and incorporating XSS-focused checks into code review and automated testing can prevent similar issues.

Find out what's already
exploitable in your codebase.