New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 852716 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 851821
Owner:
Closed: Oct 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug-Security



Sign in to add a comment

Security: Chromium PDF reader automatically opens URL through PDF URI tag

Reported by vincentr...@gmail.com, Jun 14 2018

Issue description

This template is ONLY for reporting security bugs. If you are reporting a
Download Protection Bypass bug, please use the "Security - Download
Protection" template. For all other reports, please use a different
template.

Please READ THIS FAQ before filing a bug: https://chromium.googlesource.com
/chromium/src/+/master/docs/security/faq.md

Please see the following link for instructions on filing security bugs:
https://www.chromium.org/Home/chromium-security/reporting-security-bugs

NOTE: Security bugs are normally made public once a fix has been widely
deployed.

VULNERABILITY DETAILS
Please provide a brief explanation of the security issue.

VERSION
Chrome Version: 66.0.3359.181 (Official Build) Built on Ubuntu / Version 67.0.3396.87 (Official Build) (64-bit) MacBook

Operating System: Running on Ubuntu 17.10 (64-bit) / MacBook


REPRODUCTION CASE
Please include a demonstration of the security bug, such as an attached
HTML or binary file that reproduces the bug when loaded in Chrome. PLEASE
make the file as small as possible and remove any content not required to
demonstrate the bug.

Open readpasswd.pdf, the PDF viewer will open /etc/passwd. Open kpncom.pdf and it will open a browser to http://kpn.com. This works without user interaction.

 
readpasswd.pdf
5.0 KB Download
kpncom.pdf
5.0 KB Download

Comment 1 by wfh@chromium.org, Jun 14 2018

can you supply the source for these two PDF files please?

Comment 2 by wfh@chromium.org, Jun 14 2018

Cc: tsepez@chromium.org thestig@chromium.org
Components: Internals>Plugins>PDF

Comment 3 by wfh@chromium.org, Jun 14 2018

Labels: Security_Severity-Low Security_Impact-Stable Pri-1
I'm assuming that the content of the PDF would not be readable back even by script, or can you demonstrate that? Until then, I think this sounds like a Low
I used the PDF generator from Thinkst to create tokens. I do not have the actual source, but this is what triggers the bug:

16 0 <</S/URI/URI(file:///etc/passwd)>>

I cannot read back the contents. 
pdfgen.py
2.5 KB View Download
template.pdf
5.0 KB Download
'To create tokens' I mean to create the PDFs of course.
Using mutool (mupdf-tools) it is possible to decompress the PDF streams, and still have a valid PDF. 

mutool clean -d readpasswd.pdf out.pdf

You can open it in a text editor and change the URI element directly (line 135). The decompressed file is attached!
decompressed.pdf
4.7 KB Download
Project Member

Comment 7 by sheriffbot@chromium.org, Jun 15 2018

Labels: -Pri-1 Pri-2
Owner: tsepez@chromium.org
Status: Assigned (was: Unconfirmed)
That is WAI, there is an "AA" entry (additional action) with trigger "O" (triggers when page is open), that causes opening the URL. This does seem fishy, though if the user has already opened a compromised pdf, they might as well open an evil url.

Options:
- Ignore this.
- Disable page open additional actions (I don't know of use cases for that, has anyone run into that?)
- Disable opening URLs except for links

Tom, WDYT?

Comment 9 by tsepez@chromium.org, Jun 20 2018

Owner: hnakashima@chromium.org
Yea, seems like we should only honor web-safe resources.
Cc: nasko@chromium.org
So should we block file:// and chrome://, but not http(s):// ?

nasko@, perhaps you have a perspective here, for the PDF Viewer and plugins in general?
Status: Started (was: Assigned)

Comment 12 by nasko@chromium.org, Jun 22 2018

Cc: creis@chromium.org alex...@chromium.org
Adding creis@ and alexmos@ for input, as I'm out of office this week.
Hi all, any updates on the status of this issue?
Labels: OS-Chrome OS-Linux OS-Mac OS-Windows
This got fixed with https://pdfium-review.googlesource.com/c/pdfium/+/43410 which prevents URI additional actions that require no user interaction.

What is left for this but is to block URIs like file:// and chrome:// for links the user needs to click on.
Found this:

https://cs.chromium.org/chromium/src/chrome/browser/resources/pdf/navigator.js?l=185&rcl=a9c450d1237c78cfcf93603697c9972f7adf5187

This restricts navigation to URIs with the schemes: http, https, ftp, and file, plus mailto. In special, the file scheme is only accepted if we looking at a local file already.

WDYT, should we keep the restriction as it is or make it stronger and disallow navigation to files regardless?
If navigating to a file:// URL now requires (1) starting from a file:// PDF and (2) a user interaction, and if navigating to a chrome:// URL is not allowed, then this sounds fixed to me.  That would be on par with file:// HTML pages, which are allowed to link to other file:// URLs.

(That also sounds the expected outcome of the fixes for  issue 654279  and  issue 533520 .)
Status: Fixed (was: Started)
Great, marking as fixed then.
Project Member

Comment 19 by sheriffbot@chromium.org, Oct 12

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Labels: reward-topanel
Labels: -reward-topanel reward-0
Mergedinto: 851821
Status: Duplicate (was: Fixed)
Hi vincentrr91@ - I'm afraid the VRP panel declined to award for this, as they deemed it to be a dupe of  issue 851821  that was reported just a little before this one. Still, many thanks!
Project Member

Comment 22 by sheriffbot@chromium.org, Jan 19 (3 days ago)

Labels: -Restrict-View-SecurityNotify allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment