/

CVE-2026-62853

Severity:

CRITICAL RISK

(9.9)

Code Injection (CWE-94) in ThingLinks Rule Engine API

CVE-2026-62853

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-78, CWE-94

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.9)

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

ThingLinks versions before 1.4.0 allow authenticated users to submit Groovy scripts through the rule engine's script test and registration endpoint, where the scripts are compiled and instantiated without effective sandboxing. An attacker with valid access to this endpoint may execute arbitrary code on the server.

ThingLinks versions before 1.4.0 allow authenticated users to submit Groovy scripts through the rule engine's script test and registration endpoint, where the scripts are compiled and instantiated without effective sandboxing. An attacker with valid access to this endpoint may execute arbitrary code on the server.

Affected context

The vulnerability occurs in the ThingLinks rule engine's /groovyScriptTest/registerScript flow when user-controlled Groovy content is sent to a compilation and loading process that does not adequately restrict executable behavior. Exploitation depends on the endpoint being reachable and an attacker possessing authenticated access capable of submitting or registering script content.

The vulnerability occurs in the ThingLinks rule engine's /groovyScriptTest/registerScript flow when user-controlled Groovy content is sent to a compilation and loading process that does not adequately restrict executable behavior. Exploitation depends on the endpoint being reachable and an attacker possessing authenticated access capable of submitting or registering script content.

Exploit preconditions

  • Attack surface: The ThingLinks rule engine script test and registration endpoint
  • Required access: Valid authentication with permission to submit or register Groovy scripts
  • Trigger point: Server-side compilation, loading, and instantiation of the submitted script
  • Why exploitation is possible: User-supplied code is processed without an effective execution sandbox or sufficiently restrictive validation
  • Attack surface: The ThingLinks rule engine script test and registration endpoint
  • Required access: Valid authentication with permission to submit or register Groovy scripts
  • Trigger point: Server-side compilation, loading, and instantiation of the submitted script
  • Why exploitation is possible: User-supplied code is processed without an effective execution sandbox or sufficiently restrictive validation

Why this happens

The underlying issue is the treatment of user-controlled Groovy source as trusted executable logic. The application compiles and loads submitted script content without enforcing a narrowly defined language subset, safe execution boundary, or effective sandbox, allowing attacker-selected operations to run in the server process. This primarily maps to CWE-94, Code Injection, and may also involve CWE-78 where injected code reaches operating-system command execution.

The underlying issue is the treatment of user-controlled Groovy source as trusted executable logic. The application compiles and loads submitted script content without enforcing a narrowly defined language subset, safe execution boundary, or effective sandbox, allowing attacker-selected operations to run in the server process. This primarily maps to CWE-94, Code Injection, and may also involve CWE-78 where injected code reaches operating-system command execution.

Potential impact

  • An attacker may execute arbitrary code in the ThingLinks server process.
  • The compromise could expose application secrets, credentials, and IoT platform data.
  • An attacker could alter rules, tamper with device-related workflows, or poison operational data.
  • The server may be used to access connected systems or move laterally, depending on its privileges and network position.
  • An attacker may execute arbitrary code in the ThingLinks server process.
  • The compromise could expose application secrets, credentials, and IoT platform data.
  • An attacker could alter rules, tamper with device-related workflows, or poison operational data.
  • The server may be used to access connected systems or move laterally, depending on its privileges and network position.

General mitigation guidance

Mitigation generally centers on removing direct execution of user-supplied

source code and reducing trust in script content.

Common defensive patterns include:

  • Replacing unrestricted Groovy evaluation with a constrained rule or expression language.
  • Applying allowlisted syntax, APIs, classes, and operations when scripting is required.
  • Executing approved logic in an isolated, least-privileged worker with restricted network and filesystem access.
  • Separating script compilation from sensitive application privileges and credentials.
  • Enforcing authorization, auditing, rate limits, and explicit administrative approval for script registration.
  • Treating submitted scripts as untrusted even when they originate from authenticated users.

Mitigation generally centers on removing direct execution of user-supplied

source code and reducing trust in script content.

Common defensive patterns include:

  • Replacing unrestricted Groovy evaluation with a constrained rule or expression language.
  • Applying allowlisted syntax, APIs, classes, and operations when scripting is required.
  • Executing approved logic in an isolated, least-privileged worker with restricted network and filesystem access.
  • Separating script compilation from sensitive application privileges and credentials.
  • Enforcing authorization, auditing, rate limits, and explicit administrative approval for script registration.
  • Treating submitted scripts as untrusted even when they originate from authenticated users.

How teams detect issues like this

Organizations can look for:

  • Static-analysis findings involving dynamic Groovy compilation, class loading, reflection, or evaluation of request data.
  • Code-review signals where HTTP parameters or stored scripts flow into compiler, loader, interpreter, or process-execution APIs.
  • Runtime logs showing unusual script registration, compilation failures, class loading, or unexpected child processes.
  • Policy enforcement that blocks unrestricted scripting APIs and requires isolation for executable user content.
  • Automated security review tools configured to identify CWE-94 and CWE-78 data-flow patterns.

Organizations can look for:

  • Static-analysis findings involving dynamic Groovy compilation, class loading, reflection, or evaluation of request data.
  • Code-review signals where HTTP parameters or stored scripts flow into compiler, loader, interpreter, or process-execution APIs.
  • Runtime logs showing unusual script registration, compilation failures, class loading, or unexpected child processes.
  • Policy enforcement that blocks unrestricted scripting APIs and requires isolation for executable user content.
  • Automated security review tools configured to identify CWE-94 and CWE-78 data-flow patterns.

Sources

SourceLink
github.comgithub.com/mqttsnet/thinglinks/commit/311ee760dad798f48652722989fcea02349e13a3
github.comgithub.com/mqttsnet/thinglinks/releases/tag/v1.4.0
github.comgithub.com/mqttsnet/thinglinks/security/advisories/GHSA-9vph-5ccx-qp9v

Frequently asked

questions

It can be exploitable over the network when the affected script registration endpoint is exposed and the attacker has the required authenticated permissions.

Yes. The described attack requires authenticated access capable of submitting or registering Groovy script content.

Avoid compiling or executing user-supplied source code. Prefer a constrained declarative rule language, or isolate any required scripting in a strongly restricted, least-privileged execution environment.

Treat all submitted scripts as untrusted, enforce allowlists and authorization, review dynamic execution paths, and monitor script-related activity and process behavior.

It can be exploitable over the network when the affected script registration endpoint is exposed and the attacker has the required authenticated permissions.

Yes. The described attack requires authenticated access capable of submitting or registering Groovy script content.

Avoid compiling or executing user-supplied source code. Prefer a constrained declarative rule language, or isolate any required scripting in a strongly restricted, least-privileged execution environment.

Treat all submitted scripts as untrusted, enforce allowlists and authorization, review dynamic execution paths, and monitor script-related activity and process behavior.

Find out what's already
exploitable in your codebase.