GHSA-cjhf-76h2-4hwg

Suggest an improvement
Source
https://github.com/advisories/GHSA-cjhf-76h2-4hwg
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-cjhf-76h2-4hwg/GHSA-cjhf-76h2-4hwg.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-cjhf-76h2-4hwg
Aliases
Published
2026-12-01T00:49:36Z
Modified
2026-12-01T01:00:04Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H CVSS Calculator
Summary
codebase-memory-mcp: Catastrophic backtracking in .gitignore glob matching lets a repository stall the indexer
Details

Summary

The indexer's own .gitignore matcher implemented * and ** by backtracking without a bound. A pattern crafted with many wildcards, matched against a long path, made the matcher's work grow exponentially, so a repository could stall discovery indefinitely with a single ignore rule.

Impact

Indexing a malicious repository hung the indexing job and, before the daemon isolated workers, the server. Availability only.

Patches

Fixed in stable 0.10.0 by bounding matching work. In the verified v0.12.1 release, matching uses a shared 20,000-step budget. On exhaustion, the legacy matcher returns a non-match; the checked matcher reports an explicit limit/exhaustion result rather than a partial matching decision. The deterministic exhaustion regression passed. This bounds the matching work; it does not claim that every expensive input is eliminated.

Workarounds

Upgrade to a fixed release. codebase-memory-mcp recommends v0.12.1, which has been verified to contain this fix.

Credit

Reported privately by Aaron (@aaronjmars). codebase-memory-mcp thanks them for the report and careful follow-up.

Database specific
{
    "cwe_ids":  [
        "CWE-1333",
        "CWE-400"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-12-01T00:49:36Z",
    "nvd_published_at":  "2026-11-20T20:17:12Z",
    "severity":  "MODERATE"
}
References

Affected packages

npm / codebase-memory-mcp

Package

Name
codebase-memory-mcp
View open source insights on deps.dev
Purl
pkg:npm/codebase-memory-mcp

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.10.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-cjhf-76h2-4hwg/GHSA-cjhf-76h2-4hwg.json"

PyPI / codebase-memory-mcp

Package

Name
codebase-memory-mcp
View open source insights on deps.dev
Purl
pkg:pypi/codebase-memory-mcp

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.10.0

Affected versions

0.*
0.8.1
0.9.0
0.9.1rc1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-cjhf-76h2-4hwg/GHSA-cjhf-76h2-4hwg.json"