Skip to content

command injection in the custom web-link action #2945

Closed

Description

@Afnaan-Ahmed

Affected product:
Product: CherryTree
Vendor: giuspen
repository: https://github.com/giuspen/cherrytree
Version tested: 1.7.2
Tested on: Debian 13
Platforms: Linux and macOS are affected. Windows is untested.

Summary
When the optional “Custom Web Link Clicked Action” is enabled, the URL from a link in the document is placed unquoted into the user’s command template and executed through std::system(). A crafted link runs shell commands on click.

Preconditions
The user has enabled the custom web-link command (off by default, weblinkCustomOn = false) and clicks the link. This limits real-world exposure.

PoC
With the custom web-link action enabled and the default template, a link whose URL is: https://example.com/$(touch${IFS}/tmp/ct_poc)
creates /tmp/ct_poc when clicked.

Suggested fix
Run the command with g_spawn_async and an argument vector, or quote with g_shell_quote as the file-link code does, and restrict the scheme to http/https.

Activity

  1. carnil commented on Nov 1, 2026

    @carnil

    CVE-2026-118692 seems to be assigned for this issue.

  2. giuspen commented on Nov 17, 2026

    @giuspen
    Owner

    fixed in released version v1.7.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions