/

CVE-2026-71274

Severity:

HIGH RISK

(8.5)

Stored XSS (CWE-79) in OpenBK7231T MQTT Channel Labels

CVE-2026-71274

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Stored browser-based code execution and session compromise

Severity:

HIGH RISK

(8.5)

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

OpenBK7231T stores channel labels received through MQTT and later displays them in the device web panel without HTML encoding. An attacker who can publish to the relevant MQTT broker may inject script content that executes in the browser when a user views pages containing the affected label.

Affected context

The issue occurs in OpenBK7231T deployments where:

  • Channel labels can be set through the MQTT SetChannelLabel command
  • MQTT access is available to an attacker, including deployments with weak or absent broker authentication
  • The web interface renders channel labels without context-appropriate HTML encoding

The risk is greatest when authenticated administrators or other privileged users view the affected device panel.

Exploit preconditions

  • Attack surface: MQTT command handling and the device web interface
  • Required access: Permission or ability to publish the channel-label command to the MQTT broker
  • Trigger point: A user views a web-panel page that displays the modified channel label
  • Why exploitation is possible: Label data is stored with strdup() and returned without sanitization, then rendered through hprintf255() without HTML encoding

Why this happens

The vulnerability is caused by treating MQTT-supplied channel labels as trusted display content. CHANNEL_SetLabel() stores attacker-controlled data, while CHANNEL_GetLabel() exposes it to multiple HTTP rendering paths without applying output encoding or enforcing a safe content policy.

This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). The insecure pattern is the insertion of untrusted data into HTML responses without context-aware escaping, allowing stored content to be interpreted as active browser markup or script.

Potential impact

  • A malicious label may execute script in a user's browser
  • An attacker could perform actions through the victim's authenticated web session
  • Session information or sensitive interface data may be exposed, depending on browser and application controls
  • Device settings could be altered through privileged browser interactions
  • The web panel's integrity and trustworthiness could be undermined

General mitigation guidance

Mitigation generally focuses on treating all MQTT-provided labels as untrusted data and applying context-appropriate output encoding before rendering them in HTML.

Common defensive patterns include:

  • Encoding labels at every HTML output sink rather than relying only on input filtering
  • Applying strict validation for label length and permitted characters as a secondary control
  • Using safe templating or response-generation APIs that encode dynamic values by default
  • Separating data rendering from executable content and avoiding raw HTML insertion
  • Restricting MQTT publishing rights and requiring strong broker authentication and authorization
  • Applying least privilege to MQTT clients and web-panel users

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying unescaped variables passed to HTML response functions
  • Code review checks for MQTT, API, or configuration data flowing into web templates
  • Searches for direct use of label values in hprintf255() or comparable response-building functions
  • Tests that submit harmless marker strings containing HTML metacharacters and verify encoded output
  • MQTT broker policy reviews covering anonymous publishing, topic permissions, and client isolation

Automated security review tools may help identify missing output encoding, but findings should be verified against the rendering context.

Sources

SourceLink
github.comgithub.com/openshwprojects/OpenBK7231T_App

Frequently asked

questions

It may be exploitable remotely when the device's MQTT broker is network-accessible and the attacker can publish the channel-label command. The subsequent script execution occurs when a user opens the affected web panel.

Authentication is deployment-dependent. In many environments, MQTT publishing requires valid credentials, but weak broker configurations or unauthenticated access may remove that requirement.

Treat channel labels as untrusted input and apply context-aware HTML encoding at every web output location, while also restricting who can publish MQTT commands.

Use secure-by-default output encoding, review all data flows from MQTT and other external inputs into web responses, test rendering with hostile metacharacters, and enforce strong MQTT authentication and authorization policies.

Find out what's already
exploitable in your codebase.