Re: [Json] Security considerations

Carsten Bormann <cabo@tzi.org> Sun, 06 October 2013 08:12 UTC

Return-Path: <cabo@tzi.org>
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 C725321F9E96 for <json@ietfa.amsl.com>; Sun, 6 Oct 2013 01:12:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.226
X-Spam-Level:
X-Spam-Status: No, score=-106.226 tagged_above=-999 required=5 tests=[AWL=0.023, BAYES_00=-2.599, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
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 Hw4ztsScauUE for <json@ietfa.amsl.com>; Sun, 6 Oct 2013 01:12:34 -0700 (PDT)
Received: from informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) by ietfa.amsl.com (Postfix) with ESMTP id 7E61721F9E6C for <json@ietf.org>; Sun, 6 Oct 2013 01:12:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from smtp-fb3.informatik.uni-bremen.de (smtp-fb3.informatik.uni-bremen.de [134.102.224.120]) by informatik.uni-bremen.de (8.14.4/8.14.4) with ESMTP id r968CM26022802; Sun, 6 Oct 2013 10:12:22 +0200 (CEST)
Received: from [192.168.217.105] (p54892064.dip0.t-ipconnect.de [84.137.32.100]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp-fb3.informatik.uni-bremen.de (Postfix) with ESMTPSA id 34E2DD0A; Sun, 6 Oct 2013 10:12:22 +0200 (CEST)
Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\))
Content-Type: text/plain; charset="windows-1252"
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <CAHBU6iuLBDQd1a8D1vJXg4hUUQf6hBgs7vEsXZHLX_nrWE6aRA@mail.gmail.com>
Date: Sun, 06 Oct 2013 10:12:21 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <7C4636E2-2819-4FD9-819F-A3594DADA711@tzi.org>
References: <CAHBU6iuLBDQd1a8D1vJXg4hUUQf6hBgs7vEsXZHLX_nrWE6aRA@mail.gmail.com>
To: Tim Bray <tbray@textuality.com>
X-Mailer: Apple Mail (2.1510)
Cc: "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 08:12:40 -0000

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.

Grüße, Carsten

*) say, CVE-2013-0269, CVE-2013-0333