emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Greg Minshall <minshall@umich.edu>
To: Glenn Morris <rgm@gnu.org>
Cc: 48676@debbugs.gnu.org
Subject: bug#48676: Arbitrary code execution in Org export macros
Date: Thu, 27 May 2021 05:54:04 +0300	[thread overview]
Message-ID: <4005254.1622084044@apollo2.minshall.org> (raw)
In-Reply-To: Your message of "Wed, 26 May 2021 11:52:04 -0400." <2nk0nl7asb.fsf@fencepost.gnu.org>


thanks for the report.

i guess my take is that macro-evaluation, and that of other forms,
should be subject to the same restrictions as that of source block
evaluation.  i.e., prompting for permission to execute, subject to
=org-confirm-babel-evaluate= (or, more specific variables).

cheers, Greg

> Package: emacs,org-mode
> Version: 28.0.50
> Severity: important
> Tags: security
> emacs -Q hello.org, where hello.org contains:
> #+macro: hello (eval (shell-command-to-string "touch /tmp/HELLO"))
> Hello. {{{hello}}}
> Then:
> M-x org-export-dispatch
> t A
> -> now /tmp/HELLO exist, with no prompting.
> This seems contrary to normal Emacs practice for risky local variables,
> and to the section "Code Evaluation and Security Issues" in the Org manual
> (which does not mention macros).

  parent reply	other threads:[~2021-05-27  2:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 15:52 Glenn Morris
2021-05-26 17:07 ` Timothy
2021-05-26 18:00   ` Tom Gillespie
2021-05-26 23:01 ` Tim Cross
2021-05-27  2:54 ` Greg Minshall [this message]
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:

  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=4005254.1622084044@apollo2.minshall.org \
    --to=minshall@umich.edu \
    --cc=48676@debbugs.gnu.org \
    --cc=rgm@gnu.org \
    --subject='Re: bug#48676: Arbitrary code execution in Org export macros' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


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).