In April 2022, a paper called "Heal The Breach" was published, suggesting
a mitigation that does not depend on masking specific tokens or injecting
data into HTML. It is rather a generic and effective mitigation. It
suggests adding randomness to the compressed response by injecting random
bytes in the gzip filename field of the gzip stream:
https://ieeexplore.ieee.org/document/9754554
Telling users to disable gzip is not great for bandwidth consumption. I
propose that Django should implement "Heal The Breach" with sensible
default.
--
Ticket URL: <https://code.djangoproject.com/ticket/34170>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: 0 => 1
* has_patch: 0 => 1
* version: 4.1 => dev
* stage: Unreviewed => Accepted
Comment:
[https://github.com/django/django/pull/16311 PR].
--
Ticket URL: <https://code.djangoproject.com/ticket/34170#comment:1>
* keywords: => breach, htb, gzip
* owner: nobody => Andreas Pelme
Old description:
> The BREACH attach (https://breachattack.com/) was published in 2013. The
> Django project responded soon after
> (https://www.djangoproject.com/weblog/2013/aug/06/breach-and-django/)
> suggesting users to basically stop using gzip. CSRF masking was
> implemented in 2016 (#20869).
>
> In April 2022, a paper called "Heal The Breach" was published, suggesting
> a mitigation that does not depend on masking specific tokens or injecting
> data into HTML. It is rather a generic and effective mitigation. It
> suggests adding randomness to the compressed response by injecting random
> bytes in the gzip filename field of the gzip stream:
> https://ieeexplore.ieee.org/document/9754554
>
> Telling users to disable gzip is not great for bandwidth consumption. I
> propose that Django should implement "Heal The Breach" with sensible
> default.
New description:
The BREACH attack (https://breachattack.com/) was published in 2013. The
Django project responded soon after
(https://www.djangoproject.com/weblog/2013/aug/06/breach-and-django/)
suggesting users to basically stop using gzip. CSRF masking was
implemented in 2016 (#20869).
In April 2022, a paper called "Heal The Breach" was published, suggesting
a mitigation that does not depend on masking specific tokens or injecting
data into HTML. It is rather a generic and effective mitigation. It
suggests adding randomness to the compressed response by injecting random
bytes in the gzip filename field of the gzip stream:
https://ieeexplore.ieee.org/document/9754554
Telling users to disable gzip is not great for bandwidth consumption. I
propose that Django should implement "Heal The Breach" with sensible
default.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/34170#comment:2>
* needs_docs: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/34170#comment:3>
* needs_docs: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/34170#comment:4>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/34170#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"ab7a85ac297464df82d8363455609979ca3603db" ab7a85ac]:
{{{
#!CommitTicketReference repository=""
revision="ab7a85ac297464df82d8363455609979ca3603db"
Fixed #34170 -- Implemented Heal The Breach (HTB) in GzipMiddleware.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34170#comment:6>