From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GEmiEF4v32RyswAASxT56A (envelope-from ) for ; Fri, 18 Aug 2023 10:44:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2MLND14v32S4ggEAG6o9tA (envelope-from ) for ; Fri, 18 Aug 2023 10:44:14 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CBD8240F7E for ; Fri, 18 Aug 2023 10:44:13 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="lXvAYAq/"; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692348254; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=rp1y3Opd4pRihn3jvQqwj0/7OzwnHyaBQSELj8tPTJ0=; b=UjWLULmRSIPb2bPiwmOoUGtCLhQt9+lZQbV5EVAi+HSIiqj3ICKKd4QQluB7Hmv76jaSG4 oqimCI5tfWZPWO7gF2eYhg2tiFus4fBoy6XAm794FQbg4qsE/HYwg6z6xijPpmXrPDKf6t wUwECLluRSXIJW3iIet7cyfS6cDAuhRbpHKa5YbzQYvpMdesPbkUsxyjgSF/xQJSKLgU9r RUGI4eG8Mu5zlZ43KYBzcsd2qdFiqXrX1DzfC6ynrvoUovExXjukROnVmBwUXSaZTv8gUF nvRJtkx5OdJGHmUJgYxyEi0fWqvC5/y9gOheC1uYRgeYLYlGh3FcIFZBnbxQOA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692348254; a=rsa-sha256; cv=none; b=fyQcNJ0ukEr/E6KtlsUUzJu46A1HWOKGIJeKEyf69AakNBc+JUpTRG8OzJeqhBAN16Klbx cyy1eNxWz0gn1efcKtWRKDbK/xtMviZlkgdyVhCygzOHXVqeReUvwIQfw/FpZqwvFfChN+ DanDt99z7u9kBYUvFx+TDq875OeYqFqJ6ODEl3yOxRZ1m0CjWZmSfI0WEyKdoY3ErRvelU 3RVktZ/O/zFc/GzjdBO46x+5+ZphTtyqZXKUbsyrznylG3VPV4yRRFWoCt5HRZpVhWQygJ tgI+fcgmtZ33f7r40HSZl/KBVi+IudnkP4I+a1aopIHtKSBXM4J7S/sqc2ctuw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="lXvAYAq/"; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWv4e-0000kD-AL; Fri, 18 Aug 2023 04:43:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWv4d-0000j5-DY for emacs-orgmode@gnu.org; Fri, 18 Aug 2023 04:43:15 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWv4a-0001DJ-MH for emacs-orgmode@gnu.org; Fri, 18 Aug 2023 04:43:15 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A59E6240103 for ; Fri, 18 Aug 2023 10:43:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1692348190; bh=yFoLpUx1WJuqFtbUj1Ec+xo16Y733EhP3iCyjuh1xtQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=lXvAYAq/tFVSVJX4/A9oUVacRzZBkQUeAEOCJEFsTL+yODELVLQEMOn+F9VkLlZTn XZ6tbDoXIsOzTvf8mJB08wiqJFFTUGMs3yyjDZqYn7fOs6iKeL166umedHO+VwzT0T nPao3oDU4OING5RnXINGFAvL/1XfP1jGktEWxtLN/nArORLjcwfBxql8uy5q55+020 CecdCt5bcVizi55hpQKaODxe0QBCZr6KMpcihpOQ7uEvqD5+tqqRJ7Bdv4DTHNi8qj N3BMRildZAL4mOgH3csyhZJfmKzcnQI+8UNSD7iiXyt13Oo2bp9HTbkD7i8Yu065ur Ori8CApgvd3jg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RRwPV083Gz9rxG; Fri, 18 Aug 2023 10:43:09 +0200 (CEST) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [BUG][SECURITY] ob-sqlite header args allows execution of arbitrary shell commands In-Reply-To: References: <87zg2vl6qc.fsf@localhost> Date: Fri, 18 Aug 2023 08:43:35 +0000 Message-ID: <87cyzkpwp4.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -9.38 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: CBD8240F7E X-Spam-Score: -9.38 X-TUID: +ogmWioS225b Max Nikulin writes: > On 13/08/2023 14:52, Ihor Radchenko wrote: >> What do you think about creating a new API to built shell commands and >> then using it across all the babel backends? > > I support the idea in general, but not its particular implementation as > `org-make-shell-command' in your patch. > > It does not address the issue I raised. > > #+begin_src sqlite :db '(literal "/tmp/ob.sqlite$(date > >/tmp/ob-sqlite-vuln.log)") > select 1 > #+end_src Handling lisp values in header arguments is much more general issue not tied to ob-sql or even to running shell commands. It should be addressed alongside with https://orgmode.org/list/87edsd5o89.fsf@localhost -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at