Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kUTxh-00062Q-LS for pgadmin-hackers@arkaria.postgresql.org; Mon, 19 Oct 2020 12:08:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kUTxf-0006sk-F7 for pgadmin-hackers@arkaria.postgresql.org; Mon, 19 Oct 2020 12:08:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kUTxf-0006sM-9e for pgadmin-hackers@lists.postgresql.org; Mon, 19 Oct 2020 12:08:23 +0000 Received: from mail-ej1-x643.google.com ([2a00:1450:4864:20::643]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kUTxY-0003ke-Gs for pgadmin-hackers@postgresql.org; Mon, 19 Oct 2020 12:08:22 +0000 Received: by mail-ej1-x643.google.com with SMTP id a3so13501089ejy.11 for ; Mon, 19 Oct 2020 05:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LsUnFuWPZX1V+xVuY+osyTKmTgeONVWmXRONrMhvZyU=; b=HtWCA8IzJ9pRkL4/Ya0+FyqfDIDdIyCV3q4dGiGA0cAEYg1M4PnIwSvv3dVA6Kaicd zuIMqR7cBpxFX2JIM+w/p0hfcDqqnh5IcDSvwR31D3QKGbE7qHYyZikMvcTOa0/Ynuf0 RW/4h0KUw4eoJPZIkE/NGyszB7baxyLXjMCe2quABQzWHxNJiIpJ1l265uj8fLFmhPV4 yoNJuAxm8cVbOXbl7fh+bgucozr9nCy30mOoLdeO67GatFESlOgB8jHqcybV6XMBy0uV f+wN0MmwZAB/T5L/CyT89OiTzOY9F9LosBsg2T+PdQ54ZPYX9I9IJNRaClaFlL/4lKky k7UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LsUnFuWPZX1V+xVuY+osyTKmTgeONVWmXRONrMhvZyU=; b=EKAop37i+XeEp8AcuwoUA9Bbey2ib0gDicNu/Rtw4Ki3DmYp3EiQG6mK5e96WUp/ZU zIFvyJKrSoCqu2psxGETaGhif8c0Cp0RPSEfmK+LoYGHgXsTSMuk0tRdZsHgQwvcb4Gu /ceW1vVB4f4nXI9R4SKTEz2KYjbFeD4JnIrU6obMkwLYXImO2xejaDU295PBpjRcwBrR VeQGuIbkjCRZ6kMhQc2JLz0rFApQ0xd+i/nteC5/K5nfNgHXcXzzkfCVteMGViQ6Qfn3 pUkCbwG0bcqByOTfxmobIUHIB1j6ZomZRW9v+9BfBTzrxpcHf+UGnPeu7sZi8Jcj1BeA 7ung== X-Gm-Message-State: AOAM530YgywIPDJY1p1IKkR1zcFThlpSXvSzoYF8v2O9oQPWUmaX57/7 Q0PaUJyKH3ZnbB2j7nRmpfXXswivQQZit6Y7vf3MgA== X-Google-Smtp-Source: ABdhPJxg3UQUZrg01+VIZ4HvRi8/Ol3D1m62TXJXXBZnJBg/Fg75ug5h6makkh8Y+yCk5LTm8jctI7IVGKrd5DP9QP4= X-Received: by 2002:a17:906:f151:: with SMTP id gw17mr16589754ejb.119.1603109294408; Mon, 19 Oct 2020 05:08:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dave Page Date: Mon, 19 Oct 2020 13:08:03 +0100 Message-ID: Subject: Re: [pgAdmin][5919] Fix security related issues To: Ganesh Jaybhay Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="00000000000007a1a505b204f858" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000007a1a505b204f858 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi On Mon, Oct 19, 2020 at 1:01 PM Ganesh Jaybhay < ganesh.jaybhay@enterprisedb.com> wrote: > Hi Hackers, > > Please find the attached patch to fix the below security issues: > > - Host Header Injection - Added ALLOWED_HOSTS list to limit host > address > - Lack of Content Security Policy (CSP) - Added security header > - Lack of Protection Mechanisms - HSTS - Added security header > - Lack of Cookie Attribute =E2=80=93 Secure : Kept as False as secure = limits > cookies to HTTPS traffic only. > - Information Disclosure =E2=80=93 Web Server / Development Framework > VersionDescription: Kept as hard coded 'Python' instead of exposing > wsgi/python/gunicorn version info. > > Please review and let me know if I have missed anything. > I took a very quick look at this, and one thing that immediately stood out is that HSTS should definitely not be enabled by default. That can make dev/test/redeploy extremely difficult. --=20 Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EDB: http://www.enterprisedb.com --00000000000007a1a505b204f858 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Mon, Oct 19, 2020 at 1:01 PM Ganesh Jaybhay <= ganesh.jaybhay@enterpris= edb.com> wrote:
Hi Hackers,

Please find the atta= ched patch to fix the below security issues:
  • Host Header = Injection -=C2=A0Added ALLOWED_HOSTS list to limit host address=C2=A0
  • <= li>Lack of Content Security Policy (CSP) - Added security header
  • La= ck of Protection Mechanisms - HSTS -=C2=A0Added security header
  • Lac= k of Cookie Attribute =E2=80=93 Secure : Kept as False as secure limits coo= kies to HTTPS traffic only.
  • Information Disclosure =E2=80=93 Web Se= rver / Development Framework VersionDescription: Kept=C2=A0as hard coded &#= 39;Python' instead of exposing wsgi/python/gunicorn version info.
  • <= /ul>
    Please review and let me know if I have missed anything.

I took a very quick look at this, = and one thing that immediately stood out is that HSTS should definitely not= be enabled by default. That can make dev/test/redeploy extremely difficult= .
=C2=A0
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnak= e

EDB: htt= p://www.enterprisedb.com

--00000000000007a1a505b204f858--