Attachment references in markdown don't warn before downloading
A markdown link in a report could be crafted so that when the report is exported as a PDF, clicking the link redirects the user without the usual third-party warning popup. An attacker could use this to send victims to an external site, potentially exposing their IP address or tricking them into logging in.
- Triaged in 2 months
- Fixed in 3 months
- Paid in 3 months
- Disclosed after 4 months
Summary: By default if any link of report is clicked, There will be a popup to user that you're visiting a third-party website please proceed at your own risk etc. However, when a user views the report all links are non clickable and file URI is appended. I have Found out that I can bypass this functionality by appending a " and ) in the end . For example if you view this link as PDF and click the link it will simply redirect you to the URL.
there will be a popup, That you are visited a third party domain etc. Description:
Steps To Reproduce
- create a H1 report with the following payload
- view the report click export and view as pdf
- hover the link and click .
- observe that you are directly redirected without any warning of going to third party domain.
Optional: Your Environment (Browser version, Device, etc)
Optional: Supporting Material/References (Screenshots)
Impact
By using this vulnerability an attacker might be able to get a victims IP address , make them login etc.
Context
HackerOne renders bug bounty reports as Markdown. When a reader clicks a link inside a report, the platform is meant to show a popup warning that the reader is leaving for a third-party website and that they should proceed at their own risk. The report here concerns the PDF export of a report: when a report is exported and viewed as a PDF, links in the rendered document are not clickable in the normal way, and a file URI is appended to them. The researcher found a way to make a link in the exported PDF clickable and to have it redirect the reader to an arbitrary URL without the third-party warning.
The weakness was classified as an open redirect, the asset was hackerone.com, and the report was rated low severity. It was disclosed on 25 February 2022.
Setup
No special accounts, roles, tools or versions are described. The only precondition is the ability to create a HackerOne report containing attacker-controlled Markdown, and then to export that report and view it as a PDF. The researcher's environment section is left empty.
Finding it
The researcher started from the expected behaviour: by default, clicking any link in a report triggers a popup telling the user they are visiting a third-party website and to proceed at their own risk. In the PDF view of a report, however, all links are non-clickable and a file URI is appended to them. That is the defence the researcher set out to bypass.
The bypass the researcher found is to append a double quote and a closing parenthesis to the end of the link. With that suffix, the link in the exported PDF becomes clickable and redirects straight to the target URL, with no popup.
Exploitation
Step 1: Create a report with the payload
The researcher creates a HackerOne report whose body contains the following Markdown:
(https://example.com")
The link target is https://example.com, and the trailing " and ) are the characters that break out of the way the PDF renderer wraps or terminates the link.
Step 2: Export the report and view it as a PDF
The researcher views the report, clicks export and chooses to view it as a PDF.
Step 3: Hover and click the link
In the PDF, the link is now clickable. The researcher hovers over it and clicks.
Step 4: Observe the redirect
The browser is taken directly to the target URL. No warning about visiting a third-party domain is shown, in contrast to the popup that appears when a link is clicked in the normal report view.
Root cause
The report does not describe the implementation. What it shows is that the PDF export path handles link syntax differently from the normal report view: in the PDF the link is rendered as a non-clickable reference with a file URI appended, and the normal third-party warning is not applied. Appending " and ) to the URL changes how the link is parsed or emitted in the PDF, so that it becomes a live link pointing at the attacker's URL. The warning that exists in the normal view is therefore not reached on this path. Whether the underlying mistake is in the Markdown-to-PDF conversion or in the link sanitisation applied before export is not stated in the report.
Impact
In the researcher's words, an attacker using this vulnerability might be able to obtain a victim's IP address, or make them log in. Both outcomes depend on the victim opening the exported PDF and clicking the crafted link, and on what the attacker hosts at the destination. The report does not demonstrate either outcome; it states them as possibilities.
Fix
The report does not say what was changed. The behaviour it describes implies that the PDF export path should apply the same third-party warning, or the same link neutralisation, as the normal report view, so that a crafted suffix cannot turn a non-clickable reference into a live redirect.
Variants to test
- Try other suffixes after the URL in the Markdown, such as a closing bracket, a quote of the other kind, or a combination, and export to PDF. A positive result is a link that becomes clickable in the PDF and navigates without the warning.
- Try the same payload in other export formats the platform offers. A positive result is the same warning-free redirect in a format that normally neutralises links.
- Try the payload in other Markdown-rendering surfaces of the same product, such as comments or descriptions, and compare the normal view with any exported or cached rendering. A positive result is a rendering path where the third-party warning is skipped.
- Try URLs with different schemes and hosts to see which are accepted by the PDF link handling. A positive result is any scheme or host that the normal view would have warned about but the PDF does not.
Hunting notes
This kind of bug tends to hide wherever the same user content is rendered by more than one pipeline: the web view, the PDF export, email notifications, and any cached or downloadable rendering. The signal during testing is a difference in behaviour between those renderings, here a link that is inert in one view and live in another. The researcher demonstrated the missing warning end to end: a report containing the payload, an export to PDF, a click, and a redirect with no popup. The impact statement stays hedged, which fits the low severity assigned.
What happened, in plain words
HackerOne is a website where security researchers report bugs to companies. Each report is written in a simple formatting language called Markdown, and the site turns that text into a formatted page. When you click a link inside a report, HackerOne normally shows a popup first: it warns you that you are about to leave for a third-party website and that you proceed at your own risk. That popup is a safety net. It gives you a moment to think before you follow a link that someone else put in a report.
HackerOne also lets you export a report and view it as a PDF, a document format you can open in a browser or a PDF reader. In that PDF view, links are not supposed to work as normal links: they are made non-clickable and a file URI is appended to them. A URI is just an address; a file URI is an address that points at a file on your own computer rather than at a website. The idea is that a link in an exported PDF should not take you anywhere.
The researcher found that adding two characters to the end of a link, a double quote and a closing parenthesis, breaks that protection. With those characters in place, the link in the exported PDF becomes clickable again, and clicking it takes you straight to the target website with no warning popup at all.
The weakness was classified as an open redirect. An open redirect is a situation where a site or a document can be made to send you to an address of someone else's choosing, without the usual checks. The asset involved was hackerone.com, the report was rated low severity, and it was disclosed on 25 February 2022.
Setup
The report describes no special accounts, roles, tools or software versions. The only thing you need is the ability to create a HackerOne report whose text you control, and then to export that report and view it as a PDF. The researcher's environment section is left empty, so there is nothing to say about the browser or device used.
Finding it
The researcher began with what is supposed to happen. By default, clicking any link in a report brings up a popup telling the user they are visiting a third-party website and should proceed at their own risk. Think of it as a door with a sign on it: before you walk through, someone taps you on the shoulder and asks if you are sure.
In the PDF view of a report, the behaviour is different. All links are non-clickable, and a file URI is appended to them. That is the protection the researcher set out to get around. The question was whether the PDF view could be made to produce a working link anyway.
The answer was to append a double quote and a closing parenthesis to the end of the link. With that suffix, the link in the exported PDF becomes clickable and redirects straight to the target URL, with no popup. The two characters change how the link is read when the PDF is produced, so what was meant to be an inert reference turns into a live link.
Exploitation
Step 1: Create a report with the payload
The researcher creates a HackerOne report whose body contains the following Markdown:
(https://example.com")
Line by line, in plain words:
(is an opening parenthesis. In Markdown, brackets and parentheses are used to build links, so a parenthesis at the start of a line is part of the syntax the renderer is looking at.https://example.comis the address the link should point to.example.comis a placeholder domain reserved for examples, so it is a safe stand-in for any website an attacker might choose."is a double quote. It is not part of a normal web address, and it is one of the two characters the researcher uses to interfere with how the link is wrapped or terminated.)is a closing parenthesis. It is the second of the two characters, and together with the quote it is what breaks out of the expected link syntax.
The link target is https://example.com, and the trailing " and ) are the characters that break out of the way the PDF renderer wraps or terminates the link. The reason for putting this in a report is simple: a report is user content, so if the export path mishandles it, anyone who can write a report can plant the crafted link.
Step 2: Export the report and view it as a PDF
The researcher views the report, clicks export and chooses to view it as a PDF. This step matters because the normal report view is not the target. The normal view already shows the warning popup, so the interesting question is what the PDF export does with the same text. Exporting is how you move the content from one rendering path to another and see whether the protection travels with it.
Step 3: Hover and click the link
In the PDF, the link is now clickable. The researcher hovers over it and clicks. Hovering first is a way to check that the link is live at all: if the pointer does not react, there is nothing to click. The click is the actual test of whether the protection is gone.
Step 4: Observe the redirect
The browser is taken directly to the target URL. No warning about visiting a third-party domain is shown, in contrast to the popup that appears when a link is clicked in the normal report view. That difference is the whole finding: the same content behaves safely in one view and unsafely in another.
Root cause
The report does not describe the implementation. What it shows is that the PDF export path handles link syntax differently from the normal report view. In the PDF the link is rendered as a non-clickable reference with a file URI appended, and the normal third-party warning is not applied. Appending " and ) to the URL changes how the link is parsed or emitted in the PDF, so that it becomes a live link pointing at the attacker's URL. The warning that exists in the normal view is therefore not reached on this path.
A useful comparison is a form with a box for "name" and a box for "address". If someone writes their address in a way that includes the characters used to separate the boxes, the form can end up putting the wrong text in the wrong place. Here the quote and the parenthesis act like those separator characters: they confuse the step that turns Markdown into a PDF, and the result is a working link where there should have been a dead reference. Whether the underlying mistake is in the Markdown-to-PDF conversion or in the link sanitisation applied before export is not stated in the report.
Impact
In the researcher's words, an attacker using this vulnerability might be able to obtain a victim's IP address, or make them log in. An IP address is the number that identifies a device on the internet, so knowing it can reveal roughly where a visitor is and which network they use. Making someone log in means luring them to a page that looks like a login form and capturing what they type.
Both outcomes depend on the victim opening the exported PDF and clicking the crafted link, and on what the attacker hosts at the destination. The report does not demonstrate either outcome; it states them as possibilities. The report stops at showing that the warning is missing.
Fix
The report does not say what was changed. The behaviour it describes implies that the PDF export path should apply the same third-party warning, or the same link neutralisation, as the normal report view, so that a crafted suffix cannot turn a non-clickable reference into a live redirect. In everyday terms: if the front door has a sign asking visitors to confirm before leaving, the side door should have the same sign.
Variants to test
- Try other suffixes after the URL in the Markdown, such as a closing bracket, a quote of the other kind, or a combination, and export to PDF. A positive result is a link that becomes clickable in the PDF and navigates without the warning.
- Try the same payload in other export formats the platform offers. A positive result is the same warning-free redirect in a format that normally neutralises links.
- Try the payload in other Markdown-rendering surfaces of the same product, such as comments or descriptions, and compare the normal view with any exported or cached rendering. A positive result is a rendering path where the third-party warning is skipped.
- Try URLs with different schemes and hosts to see which are accepted by the PDF link handling. A positive result is any scheme or host that the normal view would have warned about but the PDF does not.
Hunting notes
This kind of bug tends to hide wherever the same user content is rendered by more than one pipeline: the web view, the PDF export, email notifications, and any cached or downloadable rendering. A pipeline here just means a chain of steps that turns stored text into something you can look at. The signal during testing is a difference in behaviour between those renderings, here a link that is inert in one view and live in another.
The researcher demonstrated the missing warning end to end: a report containing the payload, an export to PDF, a click, and a redirect with no popup. The impact statement stays hedged, which fits the low severity assigned.
Glossary
- Markdown: a simple way of writing formatted text using plain characters, such as brackets and parentheses for links.
- Third-party website: any website other than the one you are currently on.
- Popup: a small window or message that appears over the page, here used to warn before you leave the site.
- PDF: a document format that keeps its layout fixed and can be opened in a browser or a PDF reader.
- URI: an address that identifies something, such as a web page or a file.
- File URI: a URI that points at a file on your own computer rather than at a website.
- Open redirect: a weakness where a site or document can be made to send you to an address of someone else's choosing without the usual checks.
- Asset: the specific system or domain a report is about, here
hackerone.com. - Severity: a rating of how serious a bug is, here low.
- Payload: the crafted piece of text or input used to trigger a bug.
- Renderer: the part of a system that turns stored text into what you see on screen or in a document.
- Sanitisation: cleaning up user-supplied content so that it cannot do anything unexpected.
- IP address: the number that identifies a device on the internet.
- Scheme: the first part of a web address, such as
https, that says how to reach it. - Host: the part of a web address that names the server, such as
example.com. - Pipeline: a chain of processing steps that turns stored content into a finished view or file.
- Cached rendering: a saved copy of a page or document that is reused instead of being generated again.