GHSA-3PP4-64MP-9CG9

GHSA-3PP4-64MP-9CG9 is a high-severity security vulnerability in tremor-script (rust), affecting versions >= 0.7.2, < 0.11.6. It is fixed in 0.11.6.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Memory Safety Issue when using patch or merge on state and assign the result back to state

Affected versions of this crate maintains references to memory that might have been freed already.
If affects the following two tremor-script language constructs:

  • A Merge where we assign the result back to the target expression
    and the expression to be merged needs to reference the event:
let state = merge state of event end;
  • A Patch where we assign the result back to the target expression
    and the patch operations used need to reference the event:
let state = patch state of insert event.key => event.value end;

For constructs like this (it doesnt matter what is references in the expression to be merged or the patch operations) an optimization
was applied to manipulate the target value in-place, instead of cloning it.

Our Value struct which underpins all event data in tremor-script, is representing as borrowed strings beef::Cow<'lifetime, str>
that reference the actual Vec<u8> the event is based upon. We keep the raw byte-array next to the event structure inside our Event struct as a self-referential struct,
so we make sure that the structured Value and its references are valid across its whole lifetime.

The optimization was considered safe as long as it was only possible to merge or patche event data or static data.
When state was introduced to tremor-script a new possibility existed, to keep Value data around for longer than the lifetime of an event.
If event data is merged or patched into state without cloning state first, it can still reference keys or values from
the previous event, which will now be invalid. This allows access to those already freed regions of memory and to get their content out over the wire.

Workaround

If an upgrade is not possible, a possible workaround is to avoid the optimization
by introducing a temporary variable and not immediately reassigning to state:

let tmp = merge state of event end;
let state = tmp

Impact

Affected versions

tremor-script (>= 0.7.2, < 0.11.6)

Security releases

tremor-script → 0.11.6 (rust)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

The flaw was corrected in tremor-script version 0.11.6 via commit 1a2efcd by removing the optimization
and always clone the target expression of a Merge or [Patch](https://www.tremor.rs/docs/tremor-script/index#patch.

Frequently Asked Questions

  1. What is GHSA-3PP4-64MP-9CG9? GHSA-3PP4-64MP-9CG9 is a high-severity security vulnerability in tremor-script (rust), affecting versions >= 0.7.2, < 0.11.6. It is fixed in 0.11.6.
  2. Which versions of tremor-script are affected by GHSA-3PP4-64MP-9CG9? tremor-script (rust) versions >= 0.7.2, < 0.11.6 is affected.
  3. Is there a fix for GHSA-3PP4-64MP-9CG9? Yes. GHSA-3PP4-64MP-9CG9 is fixed in 0.11.6. Upgrade to this version or later.
  4. Is GHSA-3PP4-64MP-9CG9 exploitable, and should I be worried? Whether GHSA-3PP4-64MP-9CG9 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether GHSA-3PP4-64MP-9CG9 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix GHSA-3PP4-64MP-9CG9? Upgrade tremor-script to 0.11.6 or later.

Other vulnerabilities in tremor-script

Stop the waste.
Protect your environment with Kodem.