{"cve":"CVE-2021-39228","nvd":{"published":"2021-09-17T14:15:08.413","modified":"2026-06-17T04:03:21.453","status":"Modified","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`.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8},"cwes":["CWE-416","CWE-825"],"references":["https://github.com/tremor-rs/tremor-runtime/commit/1a2efcdbe68e5e7fd0a05836ac32d2cde78a0b2e","https://github.com/tremor-rs/tremor-runtime/pull/1217","https://github.com/tremor-rs/tremor-runtime/releases/tag/v0.11.6","https://github.com/tremor-rs/tremor-runtime/security/advisories/GHSA-mc22-5q92-8v85","https://github.com/tremor-rs/tremor-runtime/commit/1a2efcdbe68e5e7fd0a05836ac32d2cde78a0b2e"],"products":["linuxfoundation:tremor"],"source":"nvd","synced_at":"2026-10-19T21:23:41.316049955+00:00"},"epss":{"cve":"CVE-2021-39228","score":0.01349,"percentile":0.71492,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-mc22-5q92-8v85","url":"https://osv.dev/vulnerability/GHSA-mc22-5q92-8v85","summary":"Memory Safety Issue when using patch or merge on state and assign the result back to state","modified":"2026-07-08T06:28:58.368656001Z","packages":[{"ecosystem":"crates.io","name":"tremor-script","purl":"pkg:cargo/tremor-script","ranges":[">=0.7.3 <0.11.6"],"fixed":["0.11.6"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}