Public mode

No access to your tenant or devices. Every item links to its source. What this means

Some sources, documents or advisories need attention: 272/272 feeds/APIs · 469/469 docs · 7/9 advisories · checked 03:32 UTC Customize Public modeDiscuss ChangeIntel on Discord

Repomix: attach_packed_output can bypass file-read secret scanning for supported local files

Collected exploitation and prediction evidence

Risk source coverage

CISA KEV is observed exploitation evidence. FIRST EPSS is a dated prediction of exploitation in the next 30 days. Missing scores are unknown. This collector requests predictions only for explicit CVE aliases in the public NuGet archive; Microsoft release views retain their existing prediction scope.

No collected risk observation for these identifiers. This does not establish absence of exploitation or a zero probability.

cve-program · CVE-2026-49988

Published

Repomix is a tool that packs repositories into AI-friendly files. Prior to 1.14.1, the Repomix MCP server attach_packed_output and read_repomix_output flow can register and read arbitrary local .json, .txt, .md, or .xml files without the file_system_read_file runSecretLint() safety check or Repomix packed-output validation, allowing MCP callers to bypass the local file-read secret-scanning boundary. This issue is fixed in version 1.14.1.

Source published
15 Jul 2026 18:05:10 UTC
Source modified
18 Jul 2026 01:16:12 UTC
Observed here
23 Oct 2026 15:48:27 UTC
Source terms
CVE Program Terms of Use

Original source record · Cite this exact observation · Complete original publisher JSON

This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: cve-program · CVE Program Terms of Use. Source text is retained; field grouping and change labels are provided by ChangeIntel.

CVSS 4.0 · 6.8 CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

nvd · CVE-2026-49988

Published

Repomix is a tool that packs repositories into AI-friendly files. Prior to 1.14.1, the Repomix MCP server attach_packed_output and read_repomix_output flow can register and read arbitrary local .json, .txt, .md, or .xml files without the file_system_read_file runSecretLint() safety check or Repomix packed-output validation, allowing MCP callers to bypass the local file-read secret-scanning boundary. This issue is fixed in version 1.14.1.

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Analyzed

Weakness classifications: CWE-200

Original publisher date fields

published: 2026-07-15T19:17:25.823

lastModified: 2026-10-24T21:10:00.130

1 source CPE criteria · context only
  • cpe:2.3:a:yamadashy:repomix:*:*:*:*:*:*:*:*

The original JSON retains the logical configuration operators, exclusions and version bounds.

Source published
15 Jul 2026 19:17:25 UTC
Source modified
24 Oct 2026 21:10:00 UTC
Observed here
25 Oct 2026 12:17:38 UTC
Source terms
NIST NVD usage terms; underlying source attribution retained

Original source record · Cite this exact observation · Complete original publisher JSON

This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: nvd · NIST NVD usage terms; underlying source attribution retained. Source text is retained; field grouping and change labels are provided by ChangeIntel.

CVSS 4.0 · [email protected] · Secondary · 6.8 CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

CVSS 3.1 · [email protected] · Primary · 5.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

osv · GHSA-hwpp-h97w-2h3j

Published

# `attach_packed_output` can register arbitrary `.json/.txt/.md/.xml` files and bypass the MCP file-read safety check ## Summary Repomix's MCP server exposes a normal `file_system_read_file` tool that reads absolute paths only after running the project's secret check. However, the `attach_packed_output` plus `read_repomix_output` flow can read arbitrary local `.json`, `.txt`, `.md`, or `.xml` files without the same safety check and without verifying that the file is actually a Repomix packed output. This is a medium-severity local MCP file-read boundary issue. The affected deployment is the documented `repomix --mcp` stdio server used by AI assistants. A prompt or lower-trust model action that can invoke MCP tools can use `attach_packed_output` on a local JSON/text file, receive an `outputId`, then call `read_repomix_output` to retrieve the full file content. ## Affected target - Repository: `yamadashy/repomix` - Commit reviewed: `adf5a12f2211a7fabf24ee11a21734adccee5143` - Component: MCP server tools - Package version reviewed: `[email protected]` ## Root cause The file-read safety boundary is implemented per tool rather than per local-file capability. `file_system_read_file` reads the file and runs `runSecretLint()` before returning content. `attach_packed_output` reads and registers local files through a separate path, but only checks file extension and parsing format. It does not verify a Repomix output header/schema and does not run the secret check before registering the path. ## Vulnerability chain 1. `attach_packed_output` accepts a direct file path, not only a directory. 2. `resolveOutputFilePath()` allows any file whose extension matches `.xml`, `.md`, `.txt`, or `.json`. 3. The tool reads that file with `fs.readFile(outputFilePath, 'utf8')`. 4. It extracts metrics, but malformed or non-Repomix JSON simply produces empty metrics rather than rejection. 5. `formatPackToolResponse()` registers the original file path under a generated `outputId`. 6. `read_repomix_output` resolves the `outputId` and returns the full file content. ## Auth boundary violated The respected boundary is the explicit local file-read guard: `file_system_read_file` blocks files that fail the secret scan. The ignored boundary is the alternate packed-output path. A caller can register a supported-extension file as an output and read it through `read_repomix_output` without passing through `runSecretLint()` or a packed-output validation step. ## Source trace - `src/mcp/tools/fileSystemReadFileTool.ts:72-83`: direct file reads run `runSecretLint()` and return an error if the scan finds sensitive content. - `src/mcp/tools/attachPackedOutputTool.ts:76-87`: direct file input is accepted based only on extension. - `src/mcp/tools/attachPackedOutputTool.ts:111-120`: `.json`, `.txt`, `.md`, and `.xml` are supported formats. - `src/mcp/tools/attachPackedOutputTool.ts:228-240`: JSON parse errors return empty metrics rather than rejecting the file as non-Repomix output. - `src/mcp/tools/attachPackedOutputTool.ts:272-308`: the file is read and passed to `formatPackToolResponse()` without a secret check. - `src/mcp/tools/mcpToolRuntime.ts:77-82`: `formatPackToolResponse()` registers the provided `outputFilePath` and reads it. - `src/mcp/tools/readRepomixOutputTool.ts:56-74`: `read_repomix_output` reads the registered file path and returns its content. - `README.md:984-991`: the tool is documented as providing secure access to existing packed outputs. ## Reproduction `run.sh`: ```bash #!/usr/bin/env bash set -euo pipefail set +e node run.js 2>&1 | tee transcript.txt rc=${PIPESTATUS[0]} set -e printf '%s\n' "$rc" > exit-code.txt exit "$rc" ``` The harness creates a temporary `credentials.json` containing a sentinel value, follows the `attach_packed_output` path for supported-extension files, registers the file path under an output ID, and then reads it back through the `read_repomix_output` path. It also checks the source-code contrast between the guarded direct file-read tool and the unguarded attach path. Observed transcript: ```text ATTACH_TOOL_SOURCE_READS_FILE=true ATTACH_TOOL_HAS_SECRETLINT_CHECK=false READ_FILE_TOOL_HAS_SECRETLINT_CHECK=true RUNTIME_REGISTERS_OUTPUT_PATH=true ATTACH_ACCEPTS_JSON_EXTENSION=true ATTACHED_NON_REPOMIX_JSON_PATH=true SENTINEL_READ_BACK=true REPOMIX_ATTACH_PACKED_OUTPUT_ARBITRARY_JSON_READ_REPRODUCED=true ``` ## Impact In the MCP threat model, an assistant/tool caller can read local JSON/text/Markdown/XML files through a path that bypasses the file-read tool's secret scanning. Examples include project configuration JSON, exported tokens, local tool settings, or other plaintext files with supported extensions. This does not require shell execution or writing files. It requires MCP tool-call capability against a Repomix server running with local filesystem access. ## Suggested fix Apply the same safety boundary to all local-file read paths: - Require `attach_packed_output` to validate that the target file is a genuine Repomix output before registration. - Reject malformed/non-Repomix JSON/XML/Markdown/plain files instead of registering them with empty metrics. - Run the same secret check used by `file_system_read_file` before registering or returning content. - Consider storing a content snapshot in the registry rather than registering arbitrary local paths for later reads.

Source published
1 Jul 2026 19:01:41 UTC
Source modified
1 Jul 2026 19:26:31 UTC
Observed here
24 Oct 2026 13:17:17 UTC
Source terms
GitHub Advisory Database · CC-BY-4.0

Original source record · Cite this exact observation · Complete original publisher JSON

This view projects the publisher's source fields for reading; the original JSON retains additional fields and CVE enrichment containers. Attribution: osv · GitHub Advisory Database · CC-BY-4.0. Source text is retained; field grouping and change labels are provided by ChangeIntel.

CVSS_V4 · CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Publisher rating · MODERATE

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 27 Oct 03:32 UTC · 272 of 272 readable · 270 fully read · documentation 469/469 current