Security fixes target the current release line: 3.1.x. Older 2.x releases are historical and are not maintained.
Use GitHub private vulnerability reporting for https://github.com/PeaBox-Lab/Portable-Notes when enabled. Do not publish an unpatched vulnerability. Include the affected version, reproduction steps, and (if applicable) a proof of concept that stays on the reporter's own machine.
PeaNote is designed for a single user on one machine:
- Localhost only. The HTTP server binds to
127.0.0.1and is never exposed to the network by default. - No external traffic. No telemetry, no account, no cloud API, no third-party runtime dependencies.
- Static allowlist. Only real files under
static/are served. Repository source,data/config.json,data/onboarding.json,data/index.db, parent directories, and directory listings return 404. - Same-origin mutations. POST/PUT/DELETE reject foreign
Origin/Refererheaders and requireContent-Type: application/json. This blocks drive-by writes from unrelated web pages. - Path safety. Vault-relative paths are percent-decoded before validation; absolute, drive-qualified, dot-prefixed, and traversing paths are rejected and resolved paths must stay inside the vault. Note, attachment, and history names are sanitized and length-limited, including Windows reserved device names.
- Internal data is excluded.
.portable-notes/history and trash are never indexed, exported, or link-rewritten. - Onboarding stays local.
data/onboarding.jsonrecords only banner dismissal, shortcut overlay visibility, and first-note time. It is never sent off the machine and its POST endpoint ignores unknown fields. - Preview is escaped. User Markdown is HTML-escaped before a deliberately small subset is converted to tags, and
javascript:/data:/vbscript:link targets are neutralised. - Reversible changes. Saves create history snapshots and deletes move notes to trash, so accidental edits are recoverable.
There is no authentication because the app assumes a trusted local machine. Any local process or browser page on the same origin can call the API. Do not change the bind address to 0.0.0.0 or expose the port through a tunnel without adding authentication, CSRF protection, TLS, and a separate deployment review. Do not open untrusted HTML or executable attachments from the vault.
For the full audit and the fixes applied in 3.1.0, see AUDIT_REPORT.md.