CVE-2021-39228 json
Memory Safety Issue when using patch or merge on state and assign the result back to state
published 2021-09-17 5 y ago modified 2026-07-08 4 mo ago also GHSA-mc22-5q92-8v85 , EUVD-2021-2093
- cvss
- 6.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.3%
- EPSS 1.3% chance of exploitation in 30 days, percentile 71%
- public exploits
- 0
- none known
Summary
Tremor is an event processing system for unstructured data. A vulnerability exists between versions 0.7.2 and 0.11.6. This vulnerability is a memory safety Issue when using `patch` or `merge` on `state` and assign the result back to `state`. In this case, affected versions of Tremor and the tremor-script crate maintains references to memory that might have been freed already. And these memory regions can be accessed by retrieving the `state`, e.g. send it over TCP or HTTP. This requires the Tremor server (or any other program using tremor-script) to execute a tremor-script script that uses the mentioned language construct. The issue has been patched in version 0.11.6 by removing the optimization and always cloning the target expression of a Merge or Patch. 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`.
Patch / fix
- crates.io tremor-script 0.11.6
- linuxfoundation tremor 0.11.6
Exploit prediction
1.35% chance of exploitation in the next 30 days, higher than 71% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/tremor-rs/tremor-runtime/pull/1217 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | tremor-script | >=0.7.3, <0.11.6 |
0.11.6 |
Affected products
- tremor-rs tremor-runtime
Classification
References
-
github.com
/tremor-rs/tremor-runtime/pull/1217
web, exploit, patch, third-party-advisory
-
github.com
/tremor-rs/tremor-runtime/commit/1a2efcdbe68e5e7fd0a05836ac32d2cde78a0b2e
web, patch, third-party-advisory
-
github.com
/tremor-rs/tremor-runtime/security/advisories/GHSA-mc22-5q92-8v85
web, mitigation, third-party-advisory
-
github.com
/tremor-rs/tremor-runtime/releases/tag/v0.11.6
web, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-39228
advisory
-
github.com
/tremor-rs/tremor-runtime
package
Sources
- CVE List CVE-2021-39228
- GitHub Advisory GHSA-mc22-5q92-8v85
- NVD CVE-2021-39228
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.