/

CVE-2026-49453

Severity:

HIGH RISK

(7.0)

Path Traversal (CWE-22) in Joplin Resource Synchronization

CVE-2026-49453

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-20, CWE-22

Impact:

Arbitrary File Write

Severity:

HIGH RISK

(7.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Joplin can accept synchronized resource metadata containing path separators or parent-directory components, allowing resource data to be written outside the intended resource directory. An attacker with write access to a configured synchronization target or shared notebook could create or overwrite files at an existing attacker-chosen path during background synchronization.

Affected context

The vulnerability occurs in Joplin synchronization workflows that process resource metadata supplied by a sync target or shared notebook. It becomes risky when resource identifiers or file extensions are accepted without validating path structure, and those values are later combined with a local destination directory before the synchronized blob is written.

Exploit preconditions

  • Attack surface: Background resource synchronization
  • Required access: Write access to a configured synchronization target or shared notebook
  • Trigger point: Processing and storing attacker-controlled resource metadata and content
  • Why exploitation is possible: Resource identifiers and file extensions containing path separators or parent-directory components are retained and later used to construct filesystem paths without sufficient containment checks

Why this happens

The underlying bug is improper input validation combined with unsafe filesystem path construction. BaseItem.unserialize() stores resource metadata without rejecting path separators or parent-directory components, while resourceFilename() incorporates those values into a destination path used by ResourceFetcher. This behavior maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, with CWE-20: Improper Input Validation as a related weakness.

Potential impact

  • An attacker may create files outside the intended resource directory
  • Existing files at attacker-selected writable paths could be overwritten
  • Local application data or configuration could be modified
  • The application or other local processes could be disrupted
  • File writes could contribute to further compromise if sensitive or executable locations are writable

General mitigation guidance

Mitigation generally focuses on treating synchronized metadata as untrusted and enforcing destination-directory containment.

Common defensive patterns include:

  • Accepting only identifiers and extensions that conform to a strict allowlist
  • Rejecting path separators, parent-directory components, absolute paths, and platform-specific path syntax
  • Constructing paths with filesystem-aware APIs and verifying that the canonical destination remains inside the intended resource directory
  • Separating metadata validation from file-writing operations and applying checks before any write occurs
  • Restricting synchronization-target write permissions and limiting the local process's filesystem privileges
  • Using isolated, non-sensitive storage locations for synchronized resources

How teams detect issues like this

Organizations can detect related issues through:

  • Static analysis for string concatenation or path-join operations involving deserialized metadata
  • Code review checks for missing canonicalization and destination-containment validation
  • Tests using parent-directory components, absolute paths, separators, and platform-specific path formats
  • Runtime monitoring for synchronization processes writing outside approved resource directories
  • Policy enforcement that restricts application write permissions to dedicated data locations

Automated security review tools may help identify untrusted path construction and missing input validation.

Sources

SourceLink
github.comgithub.com/laurent22/joplin/commit/18e0b08c282c89ae51612c4eff67af2a45ff5163
github.comgithub.com/laurent22/joplin/commit/50518073740c4501058e366300b42c2f1925cb05
github.comgithub.com/laurent22/joplin/pull/15540
github.comgithub.com/laurent22/joplin/pull/15672
github.comgithub.com/laurent22/joplin/security/advisories/GHSA-r24r-gp6h-cwgf

Frequently asked

questions

An attacker generally needs write access to a configured synchronization target or shared notebook so they can supply malicious resource metadata and content.

No direct interaction is required after the malicious synchronized content is available; background synchronization can process it automatically.

Validate resource identifiers and extensions strictly, reject path syntax, and verify that every resolved destination remains within the designated resource directory before writing.

Treat synchronized metadata as untrusted input, use filesystem-aware path handling, apply canonical containment checks, test traversal edge cases, and run synchronization components with least-privilege filesystem access.

Find out what's already
exploitable in your codebase.