Skip to content
XSS Disclosed report Beginner

HTML injection at Company Name or Product Name and can be shown on Contact Sales form

The Company Name and Product Name fields on LinkedIn's Lead Gen form allowed a limited set of HTML elements to be stored and rendered, so an attacker could inject links and formatting. This could be used to change the page's appearance and direct users to phishing or malware sites, though JavaScript execution was not possible.

bbdc71479bfeb4ba1cecaa5333f46 Follow

Originally disclosed on HackerOne

  • Triaged in 28 hours
  • Fixed in 3 months
  • Paid in 9 days
  • Disclosed after 3 months

Summary by the researcher

I like turtles

The report

There is a stored Cross-Site Scripting (XSS) vulnerability in the LinkedIn Lead Gen Form, specifically in the Company Name and Product Name fields. The vulnerability allows attackers to inject specific HTML elements, enabling them to change the appearance of a page, which can lead to Phishing attacks via the <a> tag or Malware download links via the <a> tag. The affected HTML elements include <strong>, <em>, <a> (only if it is a HTTPS link), <ul>, <ol>, <sub>, <br>, and <sup>. This vulnerability poses a significant risk as it can be leveraged for phishing attacks and spreading malware. It's important to note that this issue occurs when naming a company or product with the payload before proceeding to the Lead Gen form. JavaScript is not possible in this context, and no <script> tags are allowed.

Steps to Reproduce:

  1. Create a new LinkedIn account or log in to an existing one.
  2. Navigate to the "Companies" section on LinkedIn and add a new company.
  3. Name the company using a payload containing the XSS vector using one of the allowed HTML elements, for example:

<a href="https://malicious-site.com">Click me!</a> 4. Save the company details and proceed to the "Contact Us" Lead Gen form for the company. 5. Observe that the XSS payload remains intact in the "Company Name" field.

OR

  1. Create a new LinkedIn account or log in to an existing one.
  2. Navigate to the "Products" section on a Company's page and add a new product for the company.
  3. Name the product using a payload containing the XSS vector using one of the allowed HTML elements, for example: <a href="https://malicious-site.com">Click me!</a>
  4. Save the product details and proceed to the "Contact Us" Lead Gen form for the product.
  5. Observe that the XSS payload remains intact in the "Product Name" field and, if applicable, in the "Company Name" field as well.

Expected Results:

The Company Name and Product Name fields should sanitize any injected HTML elements, preventing XSS attacks. Users should not be able to inject payloads into these fields, and any suspicious HTML elements should be neutralized.

Actual Results:

The Company Name and Product Name fields are vulnerable to stored XSS attacks through the allowed HTML elements.

Impact

This vulnerability can be exploited by malicious actors to perform phishing attacks or to spread malware.

The original report as published on HackerOne, by bbdc71479bfeb4ba1cecaa5333f46. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application allowed a whitelist of HTML elements in the company and product name fields without properly sanitising or escaping them before rendering on the Lead Gen form.

Impact

An attacker could use the injected links to conduct phishing or spread malware, but JavaScript execution was not possible and only a limited set of HTML elements was allowed.

What the attacker needed

A LinkedIn account; ability to create a company or product

How it was found

  1. Create or log in to a LinkedIn account.
  2. Add a new company and set its name using an allowed HTML element.
  3. Save the company and open the Contact Us Lead Gen form.
  4. Observe that the HTML remains in the Company Name field.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a website lets you type text that it later shows to other people, it must treat that text as plain text, not as instructions. Here, the site allowed some formatting tags and links to be saved in a company or product name, so an attacker could make a fake link appear on a contact form. Clicking that link could take a victim to a harmful site, but the attacker could not run their own code in the browser.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by bbdc71479bfeb4ba1cecaa5333f46

View all

2 more disclosed reports, best first.

More from LinkedIn

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.