# GHSA-QR3F-G5WF-225W: Documented --allow-dir / MCP\_PDF\_ALLOWED\_DIRS filesystem allowlist is not implemented in the pure-Rust server

- Database: GitHub
- Severity: CVSS 4.3 (Medium)
- Published: 2026-09-20
- Modified: 2026-11-03

## Affected versions

- @sylphx/citra (npm): from 4.0.0, fixed in 5.0.2
- @sylphx/pdf-reader-mcp (npm): from 4.0.0, through 4.1.3

## Description

### Summary

`SECURITY.md` and `docs/api/index.md` instruct operators to restrict filesystem reach with `--allow-dir=<path>` or `MCP_PDF_ALLOWED_DIRS`, but the pure-Rust server did not implement either name. The flags were accepted silently and had no effect: the server read any PDF the process had OS permission to open, with no warning. An operator following the hardening checklist believed filesystem access was scoped when it was not.

### Affected

`@sylphx/citra` and `@sylphx/pdf-reader-mcp` on the pure-Rust engine before the fix.

### Patched

Implemented and verified against the published artifact. The binary now accepts the flag:

```
Usage: citra-mcp-server [doctor] [--allow-dir=<path>]...
  --allow-dir=<path>       Restrict local PDFs to this directory (repeatable)
  MCP_PDF_ALLOWED_DIRS     Platform path-list of allowed directories
```

and refuses reads outside the configured set:

```
$ citra-mcp-server --allow-dir=/tmp/allowtest/allowed
{"jsonrpc":"2.0","id":2,"error":{"code":-32602,
 "message":"Access denied: path '/tmp/allowtest/outside/secret.pdf'
            is outside the configured allowed directories."}}
```

The same call without the flag proceeds to parse the file, so the flag is what makes the difference. Verified on `@sylphx/citra-linux-x64-gnu@5.0.2`; the first release carrying the fix is `@sylphx/citra@5.0.2`.

### Credit

Reported by the reporter credited below.

## References

- https://github.com/SylphxAI/anymd/security/advisories/GHSA-qr3f-g5wf-225w

Page: https://cve.now/GHSA-QR3F-G5WF-225W

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
