- Package:
- cherrytree
- Source:
- cherrytree
- Description:
- hierarchical note taking application
- Submitter:
- Dilanka Kaushal Hewage
- Date:
- 2026-11-10 11:37:02 UTC
- Severity:
- normal
- Tags:
Dear Maintainer, Two vulnerabilities affect cherrytree, both fixed upstream on 2026-10-31 in commit 0a0638651: - CVE-2026-118692: OS command injection in CtActions::link_clicked (src/ct/ct_actions_others.cc). With the custom web-link action enabled (weblink_custom_on), a note's link URL is substituted into a shell command string and run via std::system with no escaping, so a crafted URL inside a shared, synced, or imported document executes arbitrary commands as the user when the link is clicked. - CVE-2026-118693: path traversal / local file disclosure in CtStorageXmlHelper::_create_image_from_xml, which trusts an unvalidated embedded-file "filename" when a document is opened. Affected: upstream through 1.7.2, including the version currently in Debian/Kali (1.2.0+dfsg-1+b2). Fixed: upstream master, commit 0a0638651. No fixed upstream release has been tagged yet at the time of filing; a release above v1.7.2 is expected to carry the fix. Please update the package once a fixed upstream release is available, or backport commit 0a0638651. References: https://www.cve.org/CVERecord?id=CVE-2026-118692 https://www.cve.org/CVERecord?id=CVE-2026-118693 https://github.com/giuspen/cherrytree/commit/0a0638651 https://r3vpwnx.space/research/cherrytree-weblink-cmdinjection/ Thanks, Dilanka Kaushal Hewage (r3vpwnx)
Hi, Both CVEs in this report were fixed upstream on 2026-10-31. Neither fix is in a release yet (newest tag is v1.7.2, and both advisories read "through 1.7.2"). CVE-2026-118692 (OS command injection via the custom web-link action, upstream issue #2945) is fixed by commit 0a0638651f31. Instead of fmt::sprintf(template, url) followed by std::system(), the fix parses the template with Glib::shell_parse_argv(), substitutes the URL into individual argv elements, and runs it with Glib::spawn_async() (no shell). The same change also covers the file-link and folder-link custom actions, which share the std::system sink. CVE-2026-118693 (arbitrary local file read via a crafted embedded-file name, upstream issue #2944) is fixed by commit 61fca359a431, which validates the embedded-file "filename" attribute instead of trusting it. Affected shipped versions (verified in the source): bookworm 0.99.48 and trixie/sid/forky 1.2.0 both carry the vulnerable code (link_clicked sprintf+system; open_filepath/open_folderpath sprintf+system; and _create_image_from_xml reading "filename"). Attached are backports of the CVE-2026-118692 fix, adapted to the shipped versions (the upstream commit does not cherry-pick: it was refactored into ct_filesystem.cc, while the shipped versions have the call inline): CVE-2026-118692-cherrytree-1.2.0.patch trixie / sid / forky (1.2.0+dfsg-1) CVE-2026-118692-cherrytree-0.99.48.patch bookworm (0.99.48+dfsg-1) Both are DEP-3 and touch three files (ct_actions_others.cc, ct_filesystem.cc, ct_filesystem.h). They route all three custom-action sinks (web, file, folder link) through a new helper that parses the trusted template with Glib::shell_parse_argv, substitutes the untrusted argument into argv elements, and spawns with Glib::spawn_async -- no shell. The existing default templates keep working: the helper drops the historical trailing "&". ct_config.h is left unchanged. Verification: - Both patches apply cleanly to the packaged sources (patch -p1). - I unit-tested the ported helper in isolation against the real g_shell_parse_argv: an argument containing $(...), backticks or ';' stays a single argv element for every template shape tested; and on a live payload, the old std::system path runs the injected command while the new argv+spawn path does not. - I did not rebuild the full GTK application; the change uses only Glib/spdlog calls already present in these files. I can provide a backport for CVE-2026-118693 as well if that would help. Regards, Sumit
Hi, A correction to my previous message regarding CVE-2026-118693. There I listed "_create_image_from_xml reading the filename attribute" as making the shipped versions affected. On closer inspection that is not accurate: the attribute is read, but in 0.99.48 and 1.2.0 it is never used to open a file, so the arbitrary read described in the CVE is not reachable there. - 0.99.48 has no multifile support; _create_image_from_xml takes the embedded-file bytes only from base64 in the XML. The filename is kept for display and as the save-dialog default, but never opens a file. - 1.2.0 takes the bytes from base64 (single-file) or from the multifile store keyed by the sha256sum attribute (CtStorageMultiFile::read_blob matches on sha256sum), never from a path built from "filename". The read fixed by 61fca359a431 lives in newer code: CtImageEmbFile::_checkNonEmptyRawBlob reads multifile_dir/_fileName when the in-document blob is empty. That function is not present in 0.99.48 or 1.2.0. So I would suggest CVE-2026-118693 is not-affected for bookworm 0.99.48 and trixie/sid/forky 1.2.0. The only related weakness I can find in these versions is a possible traversal in the temporary filename when a user explicitly opens an embedded file (CtActions::embfile_open reuses the stored name unsanitised); upstream's sanitize_filename also covers that, and I can send a small hardening backport if you consider it in scope. CVE-2026-118692 and the backports attached to my previous message are unaffected by this correction. Regards, Sumit
I am uploading a LowNMU to sponsor the patch. The changes are in git.
Hello, Bug #1152740 in cherrytree reported by you has been fixed in the Git repository and is awaiting an upload. You can see the commit message below and you can check the diff of the fix at: https://salsa.debian.org/debian/cherrytree/-/commit/e702d084217b476e720cdf42751538e783a40842 (this message was generated automatically) -- Greetings https://bugs.debian.org/1152740
We believe that the bug you reported is fixed in the latest version of cherrytree, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 1152740@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Bastian Germann <bage@debian.org> (supplier of updated cherrytree package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) Format: 1.8 Date: Tue, 10 Nov 2026 01:47:00 +0100 Source: cherrytree Architecture: source Version: 1.2.0+dfsg-1.1 Distribution: unstable Urgency: medium Maintainer: Patrick Winnertz <winnie@debian.org> Changed-By: Bastian Germann <bage@debian.org> Closes: 1152740 Changes: cherrytree (1.2.0+dfsg-1.1) unstable; urgency=medium . * Non-maintainer upload . [ Sumit Verma ] * Prevent OS command injection (Closes: #1152740, CVE-2026-118692) Checksums-Sha1: 06eb41c9f4475cf2362b25757b6f7bd70fa43f74 2030 cherrytree_1.2.0+dfsg-1.1.dsc 5058f4b720800a92a026d8a9e0945378933edfa8 10064 cherrytree_1.2.0+dfsg-1.1.debian.tar.xz b8aab95d933bf15cc39599b5d856af64506a48db 6497 cherrytree_1.2.0+dfsg-1.1_source.buildinfo Checksums-Sha256: 38b1727a05b16d0dd675e047c627c0fc9032fb3a0dde3b253bfd24a1ff47b105 2030 cherrytree_1.2.0+dfsg-1.1.dsc 934ece7f944bf0d5771794df29bbd62da6cb5de39416d5b346b8fa3d3bc4426e 10064 cherrytree_1.2.0+dfsg-1.1.debian.tar.xz a4a2b9abd11bb8aed5deacda025052d1b6dd2a4d5ef97a7d27dec5c779516d98 6497 cherrytree_1.2.0+dfsg-1.1_source.buildinfo Files: 08626a75e962ec9238ba9f97d7830888 2030 editors optional cherrytree_1.2.0+dfsg-1.1.dsc 4377d8b676e5a37c915bfbfeba730854 10064 editors optional cherrytree_1.2.0+dfsg-1.1.debian.tar.xz a4902180011934caf0d0fc7d9174d40e 6497 editors optional cherrytree_1.2.0+dfsg-1.1_source.buildinfo -----BEGIN PGP SIGNATURE----- iQHEBAEBCgAuFiEEQGIgyLhVKAI3jM5BH1x6i0VWQxQFAmryadQQHGJhZ2VAZGVi aWFuLm9yZwAKCRAfXHqLRVZDFD35DADQLjxTHc6I70aKx0oJnmWnQCPHU+oGOADj Qcu6yWlFngW+Jbq6k7B/m3Ctn9q8jnQI5jA7mDQXDV2L98eMzrZeK4Qhl9AXptjY IDqr3dwN5PLnSL5gBIXlEncKxE05OaxA2V7xMNAlIbtOCLmhx5pGi5uMylxx//pL Jt8t3OFdf9kI5jDWIEGZQeMSjx15vwnO48OWzgWOZdpjAFIVK95DgIo6pndJDVlU jBDbfzJJNovpTdKqHfXQXf5AoACn1nfvLk/mFKWdlnL6tD2HNNFoDh9GQ4JdEytq 6yWguZoLBliykFG4x8Nj4kwsuSkjTyVtX1OqaMv4K/LTohhJ4ZMXwNskF6utRLPD TTBzhHGSwiAaAY7B9Lt+BS6bWLAVjhBbaSs9+ZJMvC78D7K+sAETsYKIsd4j+TpF Kp/U47MBsBITc7KaXWQdjY4GC2foNgMq6XNCjZR/obwhBhcbtbaNP4EE1t89Kt2W mMZHQXQFmckglqcaukaRPEb7PW2G1Ek= =2l7l -----END PGP SIGNATURE-----
I am uploading a LowNMU importing the latest version to address this. Whether the old 1.2.0 is affected or not has to be clarified. Salvatore, have you cloned the bug because you suggest 1.2.0 IS affected?
We believe that the bug you reported is fixed in the latest version of cherrytree, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 1153571@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Bastian Germann <bage@debian.org> (supplier of updated cherrytree package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) Format: 1.8 Date: Tue, 10 Nov 2026 12:13:26 +0100 Source: cherrytree Architecture: source Version: 1.7.3+dfsg-0.1 Distribution: unstable Urgency: medium Maintainer: Patrick Winnertz <winnie@debian.org> Changed-By: Bastian Germann <bage@debian.org> Closes: 1121311 1153571 Changes: cherrytree (1.7.3+dfsg-0.1) unstable; urgency=medium . * Non-maintainer upload * d/watch: Scan GitHub * Build with libxml++5.0 (Closes: #1121311) * New upstream version 1.7.3 (Closes: 1153571) Checksums-Sha1: e36065dc52979525bb741de91457321086228345 2028 cherrytree_1.7.3+dfsg-0.1.dsc d6dab1eddc5c2c47a030d6cac7f13dffe819848c 2082940 cherrytree_1.7.3+dfsg.orig.tar.xz b1e7cfda996f749d67ea729adb25f3e100c352e1 8348 cherrytree_1.7.3+dfsg-0.1.debian.tar.xz d71485c302a06e64d33e0669952450e2547dd987 6666 cherrytree_1.7.3+dfsg-0.1_source.buildinfo Checksums-Sha256: 083b7a17ae4fcc8552dc10fa705aba09191007016f827de055d24d646d93022b 2028 cherrytree_1.7.3+dfsg-0.1.dsc 63a5299507bcf8667951b206c4630bd85218cfcd50bf165984195dc9a34e8cc3 2082940 cherrytree_1.7.3+dfsg.orig.tar.xz 3b7e28e14af7aed2338dc294f712a2bd59e8e9155b0500fc17e8f6cc5c380438 8348 cherrytree_1.7.3+dfsg-0.1.debian.tar.xz 04cb8f2557380885157cb50b14003640f30f7d35c357b584dbcb6c49b7248e77 6666 cherrytree_1.7.3+dfsg-0.1_source.buildinfo Files: 68c50482e96b116e691e5843f4713b0d 2028 editors optional cherrytree_1.7.3+dfsg-0.1.dsc 32ef7a1bb541211ef1e902883a4fa74d 2082940 editors optional cherrytree_1.7.3+dfsg.orig.tar.xz 2aa1ca27afdc8db64ae3b7bfc4e3d27b 8348 editors optional cherrytree_1.7.3+dfsg-0.1.debian.tar.xz 2c81fbfe98239497d6a64b271e46164b 6666 editors optional cherrytree_1.7.3+dfsg-0.1_source.buildinfo -----BEGIN PGP SIGNATURE----- iQHEBAEBCgAuFiEEQGIgyLhVKAI3jM5BH1x6i0VWQxQFAmry/OwQHGJhZ2VAZGVi aWFuLm9yZwAKCRAfXHqLRVZDFOPIDADncCmTQLRnPkoT6+8l6ASZPKx2tTcoenft jmDxoDEoBdVfVnoQZeohxWR2gmN64gbxByGNF+zwhRinA9A3nU0UvO6tmcJxzJnS aXghzC5jREkRfOzq50m/9UlxP5ihZh+4LZ4X7OPn/JZx8hXEYbp2k9OMh88TwJOI 8qzgpjUW3Q1p48B56gRekbRxKnhAGcFXIsfIeObm8F/XeoPNVuZdPpwqcTBM0giZ w7ijAVyeOF3MdTa1L2XPNxHxFd+UxLgDYsKkfr3j/bNjwh0tl532brYAZcCT5Apf gIvfQiQ06nZCiJZ50LdgHlbT/74z5IbGTCyIIxWjBiXS7yurHRpSNsAf3GgXf9/1 Ij9uNB3q67qmAPQ1NLl2Ee/NzdPi2FO5XHurM8GQsmmQCvLhfZMWcQbY4G5hI1QT +Kl4J3QjL6SSpGRgpwkac+ZDD7FHIs7BCIUBmS96wjolnhucL6+zn3fCaMRtwO+c l7z6EkFp7M6KiYyPZAHtAhvxxT/MD70= =IjGD -----END PGP SIGNATURE-----