Re: [Json] Security considerations

R S <sayrer@gmail.com> Sun, 06 October 2013 22:25 UTC

Return-Path: <sayrer@gmail.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D37E721E80DD for <json@ietfa.amsl.com>; Sun, 6 Oct 2013 15:25:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599, HTML_MESSAGE=0.001, NO_RELAYS=-0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v-TPS+QcS+KF for <json@ietfa.amsl.com>; Sun, 6 Oct 2013 15:25:38 -0700 (PDT)
Received: from mail-qa0-x22f.google.com (mail-qa0-x22f.google.com [IPv6:2607:f8b0:400d:c00::22f]) by ietfa.amsl.com (Postfix) with ESMTP id 3ACC121E80D8 for <json@ietf.org>; Sun, 6 Oct 2013 15:25:38 -0700 (PDT)
Received: by mail-qa0-f47.google.com with SMTP id k4so2503017qaq.20 for <json@ietf.org>; Sun, 06 Oct 2013 15:25:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VA2uFzQG8is1Xwvg/BXE3K5eWtYcRFT+/ZHrq/qFLqY=; b=hd5yG6FNElrWiOWO/oKnSPXj4w+LqDnj1Bixj6D7ovcA9/qVcLNgD3+p6zWuz+Uhsu 6dgCoh+lPccbt9Z9qJXcFrN4ik0OgdiC/S6j++Rm1lrqZO+1rb0H2FNyqoEHf4orcOaE CclLe0X+zaL20Jjbz3H2eo7VsHGXxCyJW2jB6k9Qq07yMtdRs+SdUk1UHg7y8n/NOKVX 9yXka6yT+qZ/YMn4LumS8F7xEhtTwABm7n0t6lOFOxmgcjX5rfFwrmWEq/2rGr6wHLsV pwAWet7ouJFVF5TQE8sUj2h9tpS16rpZmDYYrqjHtmgYdxabIQuS7JgxmbFd+YIwMZgp eZbQ==
MIME-Version: 1.0
X-Received: by 10.49.71.239 with SMTP id y15mr32376069qeu.14.1381098337657; Sun, 06 Oct 2013 15:25:37 -0700 (PDT)
Received: by 10.140.86.147 with HTTP; Sun, 6 Oct 2013 15:25:37 -0700 (PDT)
In-Reply-To: <7C4636E2-2819-4FD9-819F-A3594DADA711@tzi.org>
References: <CAHBU6iuLBDQd1a8D1vJXg4hUUQf6hBgs7vEsXZHLX_nrWE6aRA@mail.gmail.com> <7C4636E2-2819-4FD9-819F-A3594DADA711@tzi.org>
Date: Sun, 06 Oct 2013 15:25:37 -0700
Message-ID: <CAChr6Sz1B_1ZLEye=1XA=AiRUuZZ+HBiovC4VK0-aMkjd9O2ZA@mail.gmail.com>
From: R S <sayrer@gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Content-Type: multipart/alternative; boundary="047d7b5d237cd0ea0004e81a0383"
Cc: Tim Bray <tbray@textuality.com>, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] Security considerations
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 06 Oct 2013 22:25:39 -0000

On Sun, Oct 6, 2013 at 1:12 AM, Carsten Bormann <cabo@tzi.org> wrote:

> On Oct 6, 2013, at 08:10, Tim Bray <tbray@textuality.com> wrote:
>
> > It dawns on me that the #1 security consideration every web programmer
> learns, when using JSON, is “You could parse it with eval() but DON’T DO
> THAT”. So should we include that in the -bis Security Considerations
> section?
>
> Yes!
>
> Phrased this way, that would be a security consideration specific to
> JavaScript.  It may be worthwhile pointing out that there have been attack
> vectors*) in other environments as well that have tried some simple,
> incompletely checked syntactical conversion from JSON into their own
> (unsafe) literal notation and loaded/executed that.


We already have a reference to ECMAScript, and it is a pretty common case,
so it might be worth saying "eval() in ECMAScript and similar functions in
other languages..." or something like that. I believe JSON will eval in
Python as well, for example.

- Rob



>
> Grüße, Carsten
>
> *) say, CVE-2013-0269, CVE-2013-0333
>
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
>