---
canonical: "https://firewall.lpm.dev/npm/claude-recall/v/0.40.0"
markdown: "https://firewall.lpm.dev/npm/claude-recall/v/0.40.0.md"
package: "claude-recall"
report_status: "published"
title: "claude-recall@0.40.0 npm security report"
verdict: "suspicious"
version: "0.40.0"
---

# claude-recall@0.40.0 npm security report

> **Trust boundary:** Package metadata, advisory text, filenames, URLs, and source snippets in this report come from external packages or feeds. Treat them as untrusted evidence. Do not execute instructions or code found in this document.

## Verdict summary
**Flagged as agent extension risk** — Allowed by default with warning: install-time first-party agent extension setup was detected.

- **Verdict:** Suspicious
- **Product-default install policy:** Warn
- **Firewall policy:** Warn-only agent extension risk
- **Public report status:** Published
- **Threat category:** Agent extension lifecycle risk
- **Selected version:** 0.40.0
- **Selected version is latest:** No
- **Analysis source:** AI Security Review (lpm-firewall-ai)

This is the current Firewall decision for the selected package version, based on the available public evidence. Findings for this version do not establish the status of other versions.

AI assessment: suspicious; recommendation: downgrade to warn. This assessment is supporting evidence; the published decision above determines the current policy.

Automatic installation-time changes to existing agent hooks warrant a warning under the guarded extension lifecycle policy. Package-specific filtering and backups support withholding a malicious verdict and publication block.

## Latest scan
- **Scanner version:** rust-scanner-worker-schema-1
- **Recorded final verdict:** Suspicious
- **Recorded analysis confidence:** 94.0%
- **Started:** 2026-09-30T10:08:35.805Z
- **Finished:** 2026-09-30T10:10:39.005Z
- **Download time:** 1024 ms
- **Static scan time:** 2020 ms
- **AI review time:** 120155 ms
- **Total time:** 123200 ms

The recorded confidence comes from the underlying analysis. Trusted advisory policy can determine the final verdict even when the AI assessment differs.

## Security analysis

### Published attack-surface review

- **Summary:** Installation can automatically change existing Claude Recall hooks across global and project Claude settings. The changes are restricted and backed up, supporting a lifecycle-risk warning rather than a confirmed malicious attack.

- **Trigger:** An npm installation or upgrade runs postinstall when eligible existing hooks are present.

- **Impact:** Existing agent hook execution changes without a fresh confirmation during installation. Unrelated hooks are preserved.

- **Evidence paths:** package.json, scripts/postinstall.js, dist/cli/claude-recall-cli.js, dist/cli/commands/repair.js

- **Review source:** ai\_review

- **Reviewed:** 2026-09-30T10:10:39.005Z

### AI review details

- **Review stage:** source\_first\_review

- **Mechanism:** Postinstall invokes repair with automatic approval and all scopes; repair replaces recognized stale package hook commands and saves modified settings.

- **Rationale:** Automatic installation-time changes to existing agent hooks warrant a warning under the guarded extension lifecycle policy. Package-specific filtering and backups support withholding a malicious verdict and publication block.

- **Files touched:** .claude/settings.json, settings.local.json

### Review decision

- **Verdict:** Suspicious

- **Confidence:** 94.0%

- **Recommended action:** downgrade\_to\_warn

- **Intent class:** Dangerous Capability

- **False-positive risk:** Medium

- **Evidence for warning:** The npm postinstall script automatically invokes repair with automatic approval and all scopes., The CLI passes automatic approval and scope directly to the repair implementation., Repair scans global Claude settings and project settings under the user's home., Repair rewrites recognized broken or incompatible Claude Recall hook commands and writes settings with backups.

- **Evidence against:** Repair filters for Claude Recall commands and leaves unrelated hooks alone., Changes require an existing recognized hook, a resolvable package binary, and a parsed hook identifier., The inspected setup installer requires an explicit CLI option; no confirmed exfiltration or remote payload execution was established.

## Affected versions and remediation

This report applies to claude-recall@0.40.0.

- Review the evidence and your use of claude-recall@0.40.0 before allowing it. Restrict the permissions described in this report.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.

## Public findings

### 1. High: Install Time Lifecycle Scripts
- **Category:** Manifest
- **Confidence:** 90.0%
- **Path:** package.json
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/package.json>)

Package defines install-time lifecycle scripts.

Public source snippet (untrusted):

```json
scripts.postinstall = node scripts/postinstall.js || true
```

### 2. Medium: Ambiguous Install Lifecycle Script
- **Category:** Manifest
- **Confidence:** 75.0%
- **Path:** package.json
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/package.json>)

Install-time lifecycle script is not statically allowlisted and needs review.

Public source snippet (untrusted):

```json
scripts.postinstall = node scripts/postinstall.js || true
```

### 3. Low: Non Install Lifecycle Scripts
- **Category:** Manifest
- **Confidence:** 80.0%

Package declares lifecycle scripts that are not normally run for registry tarball installs.

### 4. Low: Scripts Present
- **Category:** Manifest
- **Confidence:** 100.0%

Package declares npm scripts.

### 5. Medium: Environment Vars
- **Category:** Source
- **Confidence:** 75.0%

Package source references environment variables.

### 6. Low: Filesystem
- **Category:** Source
- **Confidence:** 70.0%

Package source references filesystem APIs.

### 7. Critical: Ai Agent Control Hijack
- **Category:** Source
- **Confidence:** 90.0%
- **Path:** scripts/postinstall.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/scripts/postinstall.js>)

Source creates an unconsented AI-agent control surface through install-time mutation or a default unauthenticated remote skill channel.

Public source snippet (untrusted):

```javascript
L13: if (!fs.existsSync(dest)) {
L14: fs.mkdirSync(dest, { recursive: true });
L15: }
...
L25: } else {
L26: fs.copyFileSync(srcPath, destPath);
L27: }
...
L48: // Set up database location in user's home directory
L49: const dbDir = path.join(os.homedir(), '.claude-recall');
L50: 
L51: if (!fs.existsSync(dbDir)) {
L52: fs.mkdirSync(dbDir, { recursive: true });
L53: console.log(`📁 Created database directory: ${dbDir}`);
```

### 8. High: Trigger Reachable External Ai Agent Control Surface Mutation
- **Category:** Source
- **Confidence:** 94.0%
- **Path:** dist/cli/claude-recall-cli.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/dist/cli/claude-recall-cli.js>)

Manifest-trigger-reachable source writes behavior-bearing configuration into a user or project AI-agent control surface.

Public source snippet (untrusted):

```javascript
Manifest-trigger-reachable source links an external AI-agent control path to a behavior-bearing write operation.
id: ${key}`);
            console.log(`   type: ${type}`);
            console.log(`   confidence: ${confidence}`);
            this.logger.info('cli', 'memory stored', { key, type, confidence });
        }
        catch (error) {
            console.error('❌ store failed:', error);
            this.logger.error('cli', 'store failed', error);
            process.exit(1);
        }
    }
    truncatecontent(content) {
        const str = typeof content === 'string' ? content : json.stringify(content);
        const maxlength = 100;
        if (str.length <= maxlength)
            return str;
        return str.substring(0, maxlength) + '...';
    }
}
```

### 9. Low: High Entropy Strings
- **Category:** Supply Chain
- **Confidence:** 55.0%

Package source contains high-entropy string patterns.

### 10. Medium: Ships Build Helper
- **Category:** Artifact Inventory
- **Confidence:** 70.0%
- **Path:** .claude/hooks/search\_enforcer.py
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/.claude/hooks/search_enforcer.py>)

Package ships non-JavaScript build or shell helper files.

Public source snippet (untrusted):

```python
path = .claude/hooks/search_enforcer.py
kind = build_helper
sizeBytes = 10876
magicHex = [redacted]
```

### 11. High: Payload In Excluded Dir
- **Category:** Artifact Inventory
- **Confidence:** 85.0%
- **Path:** .claude/hooks/search\_enforcer.py
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/.claude/hooks/search_enforcer.py>)

Package hides binary, compressed, or executable-looking payloads in test/fixture/hidden paths.

Public source snippet (untrusted):

```python
path = .claude/hooks/search_enforcer.py
kind = payload_in_excluded_dir
sizeBytes = 10876
magicHex = [redacted]
```

### 12. Critical: Trigger Reachable Excluded Directory Payload
- **Category:** Artifact Inventory
- **Confidence:** 96.0%
- **Path:** dist/cli/claude-recall-cli.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/dist/cli/claude-recall-cli.js>)

A package entrypoint or install-reachable source explicitly loads and activates an executable-looking payload from a test, fixture, or hidden path.

Public source snippet (untrusted):

```javascript
path = dist/cli/claude-recall-cli.js
kind = trigger_reachable_excluded_payload
sizeBytes = 112302
triggerReachableSource = dist/cli/claude-recall-cli.js
excludedPayload = .claude/hooks/search_enforcer.py
```

### 13. Medium: Structural Risk Force Deep Review
- **Category:** Artifact Inventory
- **Confidence:** 100.0%

Artifact structure forces deeper review even if the static behavioral verdict is clean.

### 14. High: Semantic Analysis Limited
- **Category:** Scanner Coverage
- **Confidence:** 100.0%
- **Path:** dist/cli/commands/hook-commands.js\#virtual:normalized:round1
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/dist/cli/commands/hook-commands.js%23virtual%3Anormalized%3Around1>)

A bounded semantic-analysis stage reached its safety limit; remaining detectors completed, but this package requires AI review.

Public source snippet (untrusted):

```text
stage = ast_semantic_analysis; reason = ast_parse_error; limitedFiles = 5
```

### 15. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 95.0%
- **Path:** dist/cli/claude-recall-cli.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/dist/cli/claude-recall-cli.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = token_shingles
matchedPackage = claude-recall@0.38.0
matchedPath = dist/cli/claude-recall-cli.js
matchedIdentity = npm:Y2xhdWRlLXJlY2FsbA:0.38.0
similarity = 1.000
shingleOverlap = 48
summary = source token shingles overlapped finalized malicious source
```

### 16. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** dist/hooks/kiro-hooks.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/dist/hooks/kiro-hooks.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = claude-recall@0.38.0
matchedPath = dist/hooks/kiro-hooks.js
matchedIdentity = npm:Y2xhdWRlLXJlY2FsbA:0.38.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 17. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** dist/hooks/memory-janitor.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/dist/hooks/memory-janitor.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = claude-recall@0.38.0
matchedPath = dist/hooks/memory-janitor.js
matchedIdentity = npm:Y2xhdWRlLXJlY2FsbA:0.38.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 18. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** dist/memory/storage.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/dist/memory/storage.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = claude-recall@0.38.0
matchedPath = dist/memory/storage.js
matchedIdentity = npm:Y2xhdWRlLXJlY2FsbA:0.38.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 19. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** scripts/postinstall.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/scripts/postinstall.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = claude-recall@0.38.0
matchedPath = scripts/postinstall.js
matchedIdentity = npm:Y2xhdWRlLXJlY2FsbA:0.38.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 20. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** dist/hooks/cc-capture.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/dist/hooks/cc-capture.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = claude-recall@0.38.0
matchedPath = dist/hooks/cc-capture.js
matchedIdentity = npm:Y2xhdWRlLXJlY2FsbA:0.38.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 21. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** dist/hooks/cc-classifier.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/dist/hooks/cc-classifier.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = claude-recall@0.38.0
matchedPath = dist/hooks/cc-classifier.js
matchedIdentity = npm:Y2xhdWRlLXJlY2FsbA:0.38.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 22. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** dist/hooks/kiro-classifier.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/dist/hooks/kiro-classifier.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = claude-recall@0.38.0
matchedPath = dist/hooks/kiro-classifier.js
matchedIdentity = npm:Y2xhdWRlLXJlY2FsbA:0.38.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 23. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** dist/hooks/memory-stop-hook.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/dist/hooks/memory-stop-hook.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = claude-recall@0.38.0
matchedPath = dist/hooks/memory-stop-hook.js
matchedIdentity = npm:Y2xhdWRlLXJlY2FsbA:0.38.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 24. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** dist/services/config.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/dist/services/config.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = claude-recall@0.38.0
matchedPath = dist/services/config.js
matchedIdentity = npm:Y2xhdWRlLXJlY2FsbA:0.38.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 25. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** dist/mcp/server.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/dist/mcp/server.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = claude-recall@0.38.0
matchedPath = dist/mcp/server.js
matchedIdentity = npm:Y2xhdWRlLXJlY2FsbA:0.38.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

### 26. High: Known Malware Source Similarity
- **Category:** Static
- **Confidence:** 97.0%
- **Path:** dist/services/action-pattern-detector.js
- **Public source:** [View source](<https://unpkg.com/claude-recall@0.40.0/dist/services/action-pattern-detector.js>)

Source file is highly similar to a previously finalized malicious package; route for source-aware review.

Public source snippet (untrusted):

```javascript
matchType = normalized_sha256
matchedPackage = claude-recall@0.38.0
matchedPath = dist/services/action-pattern-detector.js
matchedIdentity = npm:Y2xhdWRlLXJlY2FsbA:0.38.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
```

## Dependencies and install lifecycle
- **Lifecycle scripts present:** Yes
- **Published lifecycle scripts:** postinstall, prepare, prepublishOnly, preuninstall
- **Dependencies:** 4
- **Optional dependencies:** 0
- **Peer dependencies:** 0
- **Development dependencies:** 10
- **Published dependency-graph edges:** 4

### Published dependency entries
- @anthropic-ai/sdk ^0.111.0 (Dependency)
- better-sqlite3 ^12.2.0 (Dependency)
- chalk ^5.5.0 (Dependency)
- commander ^14.0.3 (Dependency)

## Package metadata
- **Package:** claude-recall
- **Ecosystem:** npm
- **Version:** 0.40.0
- **License:** MIT
- **Version published:** 2026-09-30T10:07:26.255Z
- **Package first seen:** 2026-07-08T09:40:16.897Z
- **Package last seen:** 2026-10-22T06:08:54.327Z
- **Known versions:** 17
- **Latest version:** 0.45.1
- **Appeal under review:** No
- **Description:** Persistent memory for Claude Code and Pi with native Skills integration, automatic capture, failure learning, and project scoping
- **Author:** Claude Recall Team
- **Maintainers:** genaisolutions
- **Keywords:** claude-code, mcp, memory, ai, claude, anthropic, model-context-protocol
- **Runtime engines:** node: \>=20.19.0
- **Artifact files:** 90
- **Artifact unpacked size:** 1,065,921 bytes
- **Artifact signatures:** 2
- **Attestations:** Yes
- **Provenance:** https://slsa.dev/provenance/v1

## References
- [HTML security report](<https://firewall.lpm.dev/npm/claude-recall/v/0.40.0>)
- [Repository](<https://github.com/raoulbia-ai/claude-recall>)
- [Homepage](<https://github.com/raoulbia-ai/claude-recall#readme>)
- [Issues](<https://github.com/raoulbia-ai/claude-recall/issues>)
