LiveActive security incident?Get immediate response
CVE Record

CVE-2021-39228: Memory Safety Issue when using patch or merge on state and assign the result back to state

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`.

MediumCVSS 6.5Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2021-39228 is a memory safety flaw in Tremor. Under a specific Tremor script pattern, the system can keep references to freed memory, and later expose that memory when state is retrieved or sent externally. Business risk is mainly unintended data disclosure or corrupted processing, not service outage.

Executive priority

Treat as a moderate-priority remediation for environments using Tremor in data pipelines or external event processing. Prioritize systems that emit state over network channels, because the stated impact includes access to memory regions that may have been freed.

Technical view

Affected Tremor versions greater than 0.7.2 and before 0.11.6 can create use-after-free or expired-reference behavior when patch or merge is applied to state and immediately assigned back to state. The issue was fixed in 0.11.6 by always cloning the merge or patch target expression.

Likely exposure

Exposure is limited to Tremor servers, or programs using tremor-script, that execute scripts containing the affected state reassignment pattern. Organizations not using Tremor or tremor-script are not exposed based on the provided sources.

Exploitation context

The source bundle does not identify active exploitation, and KEV status is false. The vulnerability requires the affected script construct to execute, after which state retrieval, such as via TCP or HTTP output, may access memory that should no longer be referenced.

Researcher notes

The vulnerability maps to CWE-416 and CWE-825, with CVSS 3.1 score 6.5. The fix removes an optimization rather than adding a runtime guard. Evidence supports affected version range, root condition, and remediation, but not real-world exploitation prevalence.

Mitigation direction

  • Upgrade Tremor or tremor-script dependencies to version 0.11.6 or later.
  • If upgrading is blocked, avoid immediately reassigning patch or merge results back to state.
  • Use a temporary variable workaround as described by the vendor advisory.
  • Check vendor guidance before applying any broader operational workaround.

Validation and detection

  • Inventory Tremor runtime and tremor-script versions across deployed services.
  • Review Tremor scripts for patch or merge applied to state with immediate reassignment.
  • Confirm affected services run version 0.11.6 or later.
  • Verify any temporary-variable workaround is documented and covered by tests.
Prepared
Confidence
high
Sources
6

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-416: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cwe · low confidence lookup

CWE-825: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-39228 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
6.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
5Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
6.5CVSS 3.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N3.92.5Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

6.5Medium
CVSS 3.1 vector shape for CVE-2021-39228Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
tremor-rstremor-runtime> 0.7.2, < 0.11.6Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-416 · source CWE mapping

Use After Free

Use After Free represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.

CWE-825 · source CWE mapping

Expired Pointer Dereference

Expired Pointer Dereference represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.