Bug 1917807 - Information disclosure via pydoc
Summary: Information disclosure via pydoc
Keywords:
Status: CLOSED DUPLICATE of bug 1937476
Alias: None
Product: Fedora
Classification: Fedora
Component: python3.8
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-19 12:23 UTC by david08741
Modified: 2021-03-10 18:46 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-10 18:46:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Python 42988 0 None None None 2021-01-21 12:19:24 UTC

Description david08741 2021-01-19 12:23:17 UTC
Description of problem:
running `pydoc -p` allows other local users to extract arbitrary files.

Version-Release number of selected component (if applicable):
python3-3.8.6-1.fc32.x86_64

How reproducible:
if pydoc is running on a port

Steps to Reproduce:
1. start pydoc on a port
2. as a different user guess or extract the port
3. call getfile on the server to extract arbitrary files, e.g. http://localhost:8888/getfile?key=/home/dave/.ssh/id_rsa.pub http://localhost:8888/getfile?key=/etc/shadow

Actual results:
any local user on the multi-user system can read all my keys and secrets

Expected results:
Access is prevented.

Additional info:
At least a warning should be printed, that this is insecure on multi-user systems.

python notebook works around this by providing a token that is required to access the notepad. Depending on the system being able to read arbitrary files can allow to impersonate my, by  e.g. stealing my ssh-key (if it is non-encrypted)

Comment 1 Miro Hrončok 2021-01-19 12:53:10 UTC
Marking this private for now.

Comment 2 Miro Hrončok 2021-01-19 14:17:57 UTC
I've sent this to security

Comment 3 Todd Cullum 2021-03-05 22:03:24 UTC
(In reply to david08741 from comment #0)

Thanks for reporting. May Red Hat Product Security acknowledge you for this report?

If so, please state the name or pseudonym you wish to go by.

Comment 4 david08741 2021-03-08 09:52:21 UTC
Sure, my name is David Schwörer <davidsch at fedoraproject dot org>

Comment 5 Miro Hrončok 2021-03-10 18:46:18 UTC

*** This bug has been marked as a duplicate of bug 1937476 ***


Note You need to log in before you can comment on or make changes to this bug.