GHSA-6gqw-jqv7-v88m: stigmem-node Decay Sweep Expires And Counts Vulnerability

HIGH
CWE-863
Published
Advisory Summary

GHSA-6gqw-jqv7-v88m is a HIGH decay sweep expires and counts vulnerability (CWE-863: Incorrect Authorization) affecting stigmem-node libraries in the PyPI ecosystem. The issue involves decay sweep expires and counts facts across all tenants (cross-tenant bola). Remediation is available by upgrading affected packages to version 0.9.0a12.

GHSA-6gqw-jqv7-v88m at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-6gqw-jqv7-v88m
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-863: Incorrect Authorization
Affected Product stigmem-node
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix GHSA-6gqw-jqv7-v88m

To remediate this vulnerability, upgrade all affected stigmem-node dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

stigmem-node fixed: 0.9.0a12
pip install stigmem-node>=0.9.0a12
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show stigmem-node

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-6gqw-jqv7-v88m, inspect your installed packages using pip:

pip show stigmem-node

Analyze the terminal output to locate any version of stigmem-node in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.9.0a12), your application is affected.

Note: The pip show stigmem-node command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In stigmem-node, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary On a multi-tenant stigmem node, a caller holding a `write` credential for **one** tenant can run a decay sweep that acts on **every** tenant's facts. The candidate-selection queries in `lifecycle/decay.py` (`_select_ttl_candidates`, `_select_confidence_candidates`) carried no `tenant_id` predicate, and the caller's tenant was not threaded into the sweep or its async worker (`run_decay_sweep` / `_decay_job_worker`), reached via `POST /v1/decay/sweep`. ### Impact A sweep with `ttl_seconds=0` expires **all tenants'** facts — cross-tenant data destruction (integrity and availability). A `dry_run` sweep returns a global candidate count, acting as a cross-tenant existence/volume **oracle** (information disclosure). ### Affected configurations This is a cross-**tenant** break. It is exploitable **only** on deployments running the opt-in `stigmem-plugin-multi-tenant` (multiple tenants on one node). A default single-tenant node has only `tenant="default"` — there is no second tenant to cross — so it is **not exploitable** on default deployments. The rating is HIGH for the multi-tenant deployments the plugin exists to isolate. ### Patches Fixed in `0.9.0a12` (PR #728): `identity.tenant_id` is threaded into `run_decay_sweep` and `_decay_job_worker`, and `AND tenant_id = ?` was added to the candidate selectors and the graph-sync. A tenant-B sweep now leaves tenant-A facts untouched, and `dry_run` counts only the caller's tenant. The `check_fact_query_tenant_scope.py` CI guard was extended to scan `lifecycle/` so this class cannot silently regress. ### Workarounds None other than upgrading to `0.9.0a12`. Single-tenant deployments are unaffected.

GHSA-6gqw-jqv7-v88m Affected stigmem-node Versions

1 component(s)
Fixed Versions:
0.9.0a12
Product / Package Ecosystem Affected Versions Fixed Version
stigmem-node
PyPI
< 0.9.0a12
0.9.0a12

References

Frequently Asked Questions

What is GHSA-6gqw-jqv7-v88m?
GHSA-6gqw-jqv7-v88m is a security vulnerability in stigmem-node involving decay sweep expires and counts facts across all tenants (cross-tenant BOLA) under CWE-863: Incorrect Authorization.
Which stigmem-node versions are affected?
Affected versions include releases prior to 0.9.0a12 across affected packages: stigmem-node.
What version fixes GHSA-6gqw-jqv7-v88m?
Upgrading to 0.9.0a12 (or the latest patched release for your respective branch) resolves the vulnerability.
Is stigmem-node affected?
Yes, stigmem-node is affected in releases prior to 0.9.0a12. Upgrade your dependency to 0.9.0a12 or later.
What CWE is associated with GHSA-6gqw-jqv7-v88m?
GHSA-6gqw-jqv7-v88m is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check PyPI dependencies for GHSA-6gqw-jqv7-v88m?
Run the dependency tree command: 'pip show stigmem-node'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-6gqw-jqv7-v88m",
  "modified" : "2026-06-19T21:43:03Z",
  "published" : "2026-06-19T21:43:02Z",
  "aliases" : [ ],
  "summary" : "stigmem-node: decay sweep expires and counts facts across all tenants (cross-tenant BOLA)",
  "details" : "### Summary\nOn a multi-tenant stigmem node, a caller holding a `write` credential for **one** tenant can run a decay sweep that acts on **every** tenant's facts. The candidate-selection queries in `lifecycle/decay.py` (`_select_ttl_candidates`, `_select_confidence_candidates`) carried no `tenant_id` predicate, and the caller's tenant was not threaded into the sweep or its async worker (`run_decay_sweep` / `_decay_job_worker`), reached via `POST /v1/decay/sweep`.\n\n### Impact\nA sweep with `ttl_seconds=0` expires **all tenants'** facts — cross-tenant data destruction (integrity and availability). A `dry_run` sweep returns a global candidate count, acting as a cross-tenant existence/volume **oracle** (information disclosure).\n\n### Affected configurations\nThis is a cross-**tenant** break. It is exploitable **only** on deployments running the opt-in `stigmem-plugin-multi-tenant` (multiple tenants on one node). A default single-tenant node has only `tenant=\"default\"` — there is no second tenant to cross — so it is **not exploitable** on default deployments. The rating is HIGH for the multi-tenant deployments the plugin exists to isolate.\n\n### Patches\nFixed in `0.9.0a12` (PR #728): `identity.tenant_id` is threaded into `run_decay_sweep` and `_decay_job_worker`, and `AND tenant_id = ?` was added to the candidate selectors and the graph-sync. A tenant-B sweep now leaves tenant-A facts untouched, and `dry_run` counts only the caller's tenant. The `check_fact_query_tenant_scope.py` CI guard was extended to scan `lifecycle/` so this class cannot silently regress.\n\n### Workarounds\nNone other than upgrading to `0.9.0a12`. Single-tenant deployments are unaffected.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "stigmem-node"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.9.0a12"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/eidetic-labs/stigmem/security/advisories/GHSA-6gqw-jqv7-v88m"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eidetic-labs/stigmem/pull/728"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/eidetic-labs/stigmem"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-19T21:43:02Z",
    "nvd_published_at" : null
  }
}