[Django] #27659: Arbritrary file overrides in startproject/app template extraction

19 views
Skip to first unread message

Django

unread,
Dec 29, 2016, 5:29:16 AM12/29/16
to django-...@googlegroups.com
#27659: Arbritrary file overrides in startproject/app template extraction
---------------------------------------------+------------------------
Reporter: Florian Apolloner | Owner: nobody
Type: Bug | Status: new
Component: Utilities | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------------+------------------------
Note: This was reported as security issue intially by me, but we think
that this is more hardening than an actual issue -- if you are downloading
untrusted archives the content can be much worse anyways…

The issue here is that tar files (and probably zip files too), can store
full and/or relative paths and therefore escape out of the extraction
root.

Attached is an initial WIP to show the issue and possible solution.

--
Ticket URL: <https://code.djangoproject.com/ticket/27659>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 29, 2016, 5:29:27 AM12/29/16
to django-...@googlegroups.com
#27659: Arbritrary file overrides in startproject/app template extraction
-----------------------------------+------------------------------------

Reporter: Florian Apolloner | Owner: nobody
Type: Bug | Status: new
Component: Utilities | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Florian Apolloner):

* Attachment "patch.diff" added.

Django

unread,
Jan 3, 2017, 2:52:32 PM1/3/17
to django-...@googlegroups.com
#27659: Arbritrary file overrides in startproject/app template extraction
-----------------------------------+------------------------------------

Reporter: Florian Apolloner | Owner: nobody
Type: Bug | Status: new
Component: Utilities | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Anton Samarchyan):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/27659#comment:1>

Django

unread,
Jan 3, 2017, 3:04:05 PM1/3/17
to django-...@googlegroups.com
#27659: Arbritrary file overrides in startproject/app template extraction
-----------------------------------+------------------------------------

Reporter: Florian Apolloner | Owner: nobody
Type: Bug | Status: new
Component: Utilities | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Florian Apolloner):

* needs_better_patch: 0 => 1
* needs_tests: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/27659#comment:2>

Django

unread,
May 24, 2021, 7:11:20 AM5/24/21
to django-...@googlegroups.com
#27659: Arbritrary file overrides in startproject/app template extraction
-----------------------------------+------------------------------------

Reporter: Florian Apolloner | Owner: nobody
Type: Bug | Status: closed
Component: Utilities | Version: dev
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* needs_better_patch: 1 => 0
* has_patch: 1 => 0
* resolution: => fixed
* needs_tests: 1 => 0


Comment:

Fixed in 05413afa8c18cdb978fcdf470e09f7a12b234a23.

--
Ticket URL: <https://code.djangoproject.com/ticket/27659#comment:3>

Reply all
Reply to author
Forward
0 new messages