emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tom Gillespie <tgbugs@gmail.com>
To: Timothy <tecosaur@gmail.com>
Cc: rgm@gnu.org, 48676@debbugs.gnu.org
Subject: bug#48676: Arbitrary code execution in Org export macros
Date: Wed, 26 May 2021 11:00:09 -0700	[thread overview]
Message-ID: <CA+G3_PN-2Kir-YJ=BToXMS69K+Oj2G55EKASAt-7gqHMmnM_rg@mail.gmail.com> (raw)
In-Reply-To: <87mtsho240.fsf@gmail.com>

Hi Glenn,
     The definition for local variables doesn't cover things like org
macros, though the spirit of the policy is something worth keeping in
mind. Running M-x org-export-dispatch and hitting two keys means that
the user has to do something to trigger code execution, much like they
would have to intentionally accept certain risky local variables.

That said, the fact that many org operations can run arbitrary code is
definitely something that needs clearer documentation. It might make
sense to add a setting to detect closures that appear in org files to
ask for permission before running, but it likely should not be on by
default.

For a fairly extensive discussion of code execution in org see this
thread from Nov 2020.
https://orgmode.org/list/robi94$ma$1@ciao.gmane.io/#t
Best,
Tom




  reply	other threads:[~2021-05-26 18:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 15:52 bug#48676: Arbitrary code execution in Org export macros Glenn Morris
2021-05-26 17:07 ` Timothy
2021-05-26 18:00   ` Tom Gillespie [this message]
2021-05-26 23:01 ` Tim Cross
2021-05-27  2:54 ` Greg Minshall
2021-05-27  7:02 ` Rafael Ramirez Morales
2021-05-27 12:55   ` Tim Cross
2021-05-27 13:35     ` Rafael Ramirez Morales

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+G3_PN-2Kir-YJ=BToXMS69K+Oj2G55EKASAt-7gqHMmnM_rg@mail.gmail.com' \
    --to=tgbugs@gmail.com \
    --cc=48676@debbugs.gnu.org \
    --cc=rgm@gnu.org \
    --cc=tecosaur@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).