@mem0/openclaw-mem0 v1.0.3
Patch release — security fix, regression revert, supply-chain hardening
Compatibility: OpenClaw Gateway >=2026.3.24-beta.2 | mem0ai 2.3.0
What's Changed
Security
-
fix(openclaw): path traversal in skill-loader —
readSkillFileandreadDomainOverlayconstructed file paths from user-controllable config values (config.domain) viapath.join()without verifying the result stayed within the skills directory. A crafteddomainvalue containing../could read arbitrary files on the host filesystem. AddedsafePath()containment helper that resolves and validates all paths before anyfs.readFileSynccall. The exportedloadSkillAPI is now self-defending against traversal inputs. -
fix(openclaw): pin mem0ai to exact 2.3.0 — Changed
"mem0ai": "^2.3.0"to"mem0ai": "2.3.0". The semver caret range accepted any2.x.y >= 2.3.0, meaning a compromised minor or patch release would auto-install onnpm install. Exact pinning eliminates this supply-chain vector.
Bug Fixes
-
fix(openclaw): revert broken Post-Compaction regex rename — PR #4678 renamed
Post-CompactiontoAfter-Compactionin two noise-filter regex patterns infiltering.ts, claiming this cleared a security scanner false positive. The upstream system emits messages with the literal string"Post-Compaction Audit", so the renamed regex silently stopped matching real noise — leaking compaction audit messages into the memory extraction pipeline. Reverted to the correctPost-Compactionpattern. -
fix(openclaw): revert cosmetic comment change in recall.ts — Restored
// Over-fetch for rankingcomment (was changed to// Request more candidates for rankingto work around a scanner matching the substringfetchin a code comment).
Tests
- Added 12 new tests in
skill-loader.test.ts:- 8 unit tests for
safePath()covering parent traversal, deep traversal, nested segment traversal, bare.., valid paths, and disguised traversal - 4 integration tests for
loadSkill()covering traversal rejection, valid skill loading, and malicious domain overlay with valid skill
- 8 unit tests for
Upgrade
openclaw plugins install @mem0/openclaw-mem0@1.0.3No configuration changes required. Fully backward-compatible with v1.0.2.