CVE-2021-39228Memory Safety Issue when using patch or merge on state and assign the result back to state
- 6.5MediumCVSS base score
- 1.3%Exploitation in 30 daysEPSS · top 28% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
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`.
Timeline
ID reserved
By GitHub_M
- 32 days later
· 32 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| NVDNVD · Modified | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 1.3% · top 28% of all CVEs (18 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.5.
Affected products
- affected > 0.7.2, < 0.11.6
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- crates.iotremor-scriptGHSA-mc22-5q92-8v85 (opens in a new tab)
References
References4
- https://github.com/tremor-rs/tremor-runtime/security/advisories/GHSA-mc22-5q92-8v85 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/tremor-rs/tremor-runtime/pull/1217 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/tremor-rs/tremor-runtime/commit/1a2efcdbe68e5e7fd0a05836ac32d2cde78a0b2e (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/tremor-rs/tremor-runtime/releases/tag/v0.11.6 (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-2093 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-mc22-5q92-8v85 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-39228)Record last updated .