GHSA-xc9g-j69q-37xw

Suggest an improvement
Source
https://github.com/advisories/GHSA-xc9g-j69q-37xw
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-xc9g-j69q-37xw/GHSA-xc9g-j69q-37xw.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-xc9g-j69q-37xw
Aliases
Published
2026-08-25T18:35:32Z
Modified
2026-08-26T00:55:48Z
Severity
  • 7.1 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H CVSS Calculator
Summary
consciousness-explorer / sublinear-time-solver MCP export_state has an arbitrary file write
Details

Impact

An arbitrary file write vulnerability (CWE-73, External Control of File Name or Path) exists in the consciousness-explorer component of sublinear-time-solver. The MCP export_state (and import_state) tool accepted a user-supplied filepath argument and passed it directly to fs.writeFileSync / fs.readFileSync without constraining the destination or rejecting path traversal. An attacker able to invoke the MCP tool could write or overwrite any file accessible to the server process (e.g. ~/.ssh/authorized_keys, application files), leading to integrity loss and potential service disruption.

The same sink class was present in the main solver MCP server (saveVectorToFile / loadVectorFromFile).

Affected versions

  • consciousness-explorer < 1.1.2
  • sublinear-time-solver < 1.6.0
  • sublinear (crates.io) < 0.2.0

Patches

  • consciousness-explorer@1.1.2
  • sublinear-time-solver@1.6.0
  • sublinear@0.2.0

State/vector files are now confined to a dedicated directory (overridable via $CONSCIOUSNESS_EXPLORER_STATE_DIR / $SUBLINEAR_SOLVER_VECTOR_DIR), a basename-only contract is enforced (rejecting separators, .., NUL/control chars, hidden files, and Windows reserved names), and files are opened with O_NOFOLLOW | O_CLOEXEC mode 0o600. Covered by 14 regression tests in tests/consciousness/safe-path.test.mjs.

Breaking change: callers must now pass a basename, not an absolute path.

Workarounds

Do not expose the MCP server to untrusted clients; restrict export_state to trusted local users; run the server under a low-privilege account with a restricted working directory.

Database specific
{
    "cwe_ids":  [
        "CWE-73"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-08-25T18:35:32Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

npm / consciousness-explorer

Package

Name
consciousness-explorer
View open source insights on deps.dev
Purl
pkg:npm/consciousness-explorer

Affected ranges

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

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-xc9g-j69q-37xw/GHSA-xc9g-j69q-37xw.json"

npm / sublinear-time-solver

Package

Name
sublinear-time-solver
View open source insights on deps.dev
Purl
pkg:npm/sublinear-time-solver

Affected ranges

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

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-xc9g-j69q-37xw/GHSA-xc9g-j69q-37xw.json"