{"schema":"threatline.record/2","record":{"id":"CVE-2026-115478","aliases":["GHSA-r3g7-r4hr-m258"],"summary":"obsidian-tc: Memory-lifecycle tools overwrite unowned notes or partially commit lifecycle changes","details":"### Summary\n`create_entity`, `link_entities`, `rename_entity`, `unlink_entities` and `delete_entity` regenerate a memory note's body from SQLite at the computed `memory/<type>/<name>.md` path. When a note already existed at that path and was not owned by the entity being written (a hand-authored note, or an orphan left by a different entity whose name sanitized to the same path), its entire body was overwritten on the next write naming that `(type, name)`, keeping only its frontmatter. Separately, several of these tools inserted or removed their SQLite row before the fallible filesystem step, so a refused note write could leave a relation gone, a retired status committed, or the wrong entity deleted.\n\n### Details\n- `create_entity` and `link_entities` inserted the SQL row or relation before materialization.\n- `rename_entity` seeded the destination path with a direct atomic write that bypassed the ownership check, and for a status-only rename could commit a retired status with the note write refused.\n- `unlink_entities` removed the relation row before discovering the source note's rematerialization would be refused.\n- `delete_entity`'s cascade could delete the target and its relations before a neighbour's note was found to be foreign.\n\nThe overwrite exists in every released version since `materializeEntity` shipped (`git show v1.0.1:packages/server/src/memory/materialize.ts`).\n\n### Impact\nAn authorized caller with memory-write scope (any agent using the M5 memory tools) can, without intending to, destroy the body of a vault note outside the entity it is writing, and can leave the memory graph inconsistent with the notes on disk. Snapshots-before-write (`restore_note`) mitigate the overwrite only where snapshots are enabled and the note had been written through obsidian-tc before.\n\n### Patches\nFixed in 1.31.4 at the shared primitive: `materializeEntity` refuses to write over a note whose `obsidian_tc_id` is missing or belongs to another entity; a new `assertNoteOwnership` pre-check runs before any SQLite mutation in the three lifecycle tools, so a refusal is a no-op; `create_entity` and `link_entities` roll back the row they had inserted. Verified by `test/m5-memory-ownership.test.ts`, which covers all five call sites and the rollback.\n\n### Workarounds\nNone that preserve the tools. Disabling the `write:memory` scope for callers prevents the write path entirely.\n\n### Credit\nFound by the maintainer while building `obsidian-tc memory import` (PR #978); the vulnerability class was independently confirmed by a cross-vendor adversarial review.\n\n### References\n- PR #978 (fix and test), CHANGELOG `## [1.31.4] ### Security`\n- `packages/server/src/memory/materialize.ts`, `packages/server/src/tools/m5/memory-lifecycle-tools.ts`\n\n---","categories":["Libraries & packages"],"product":"obsidian-tc","vendor":"The-40-Thieves","ecosystem":"npm","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-r3g7-r4hr-m258","source_modified_at":"2026-10-23T18:47:40Z","fetched_at":"2026-10-23T18:48:36.087640Z","package":{"ecosystem":"npm","name":"obsidian-tc"},"range":">= 1.0.1, <= 1.31.3"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-115478","source_modified_at":"2026-10-23T14:06:28.128Z","fetched_at":"2026-10-23T18:42:43.628194Z","product":"obsidian-tc","vendor":"The-40-Thieves","versions":[{"status":"affected","version":">= 1.0.1, < 1.31.4"}],"defaultStatus":null}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-r3g7-r4hr-m258","source_modified_at":"2026-10-23T18:47:40Z","fetched_at":"2026-10-23T18:48:36.087640Z","package":{"ecosystem":"npm","name":"obsidian-tc"},"version":"1.31.4"}],"cvss":7.1,"severity":"High","kev":{"listed":false},"epss":{"probability":null,"percentile":null,"score_date":null},"published_at":"2026-10-23T14:06:28.128Z","modified_at":"2026-10-23T18:47:40Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-r3g7-r4hr-m258","fetched_at":"2026-10-23T18:48:36.087640Z","source_modified_at":"2026-10-23T18:47:40Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-115478","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23T14:06:28.128Z"}],"sources":["GitHub Advisory Database","CVE List"],"references":[{"source":"CVE List","url":"https://github.com/The-40-Thieves/obsidian-tc/security/advisories/GHSA-r3g7-r4hr-m258","tags":["x_refsource_CONFIRM"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-115478","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/The-40-Thieves/obsidian-tc/pull/978","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/The-40-Thieves/obsidian-tc/commit/99f7914ca0fbeed92e7c4d39cc8c3e5830dab133","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/The-40-Thieves/obsidian-tc/blob/v1.31.4/CHANGELOG.md","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/The-40-Thieves/obsidian-tc/releases/tag/v1.31.4","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-r3g7-r4hr-m258","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-23T18:47:40Z","content_hash":"8eb545cfe7a1f4f276860901c5b9642bf0e506c036ee6ba9bbf6fef9caa85c8d"}}
