Skip to content
XSS Write-up Beginner

Uncovering a Critical Vulnerability: My Journey of Discovering CVE-2021–31589, a Reflected XSS in LinkedIn

The author claims to have found a reflected XSS vulnerability in LinkedIn using a custom NodeJS tool, but provides no technical details about the vulnerable parameter or payload. The CVE mentioned actually refers to a different product (BeyondTrust), so the report is thin and lacks evidence.

Karthikeyan.V Follow

Published on medium.com

Information Security

Karthikeyan.V, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

This write-up covers a reflected cross-site scripting (XSS) issue that the author, Karthikeyan.V, reports finding in LinkedIn. The report is short on target detail: it does not name the LinkedIn endpoint, parameter, hostname or feature involved, and it does not show the request or response that triggered the behaviour. What it does describe is the recon workflow that led to the finding, the tool the author built to detect it, and the CVE identifier he attached to the work.

From the original on medium.com

The CVE in the title, CVE-2021-31589, is described in the report as a vulnerability that lets attackers execute malicious code on a user's system through a specially crafted URL, affecting BeyondTrust Secure Remote Access Base Software version 6.0.1 and earlier. That is a different product from LinkedIn. The report does not explain the relationship between that CVE and the LinkedIn finding beyond naming the tool after it, so treat the CVE reference as the author's labelling of his tooling rather than as a description of the LinkedIn defect itself.

Setup

The report lists no accounts, roles, test users or LinkedIn versions. The tooling is the substance of the setup:

  1. Subdomain enumeration. assetfinder is used to find subdomains. Because the author expects other hunters to use the same tool and therefore to find the same names, he also brute-forces subdomains with subsleuth, which he describes as designed for subdomain brute forcing and for discovering subdomains of subdomains.
  2. Liveness checking. httpx is used to work out which of the discovered domains are active and live.
  3. Manual testing. While automation runs, the author loads all recon data into Burp Suite using burpflow, a tool of his own. He says it creates a proxy and loads the data into Burp in a few seconds, which lets him start manual attacks quickly.

The detection itself was done with a tool the author wrote in NodeJS and ran against LinkedIn.

Finding it

The author frames the discovery as the product of routine recon rather than a specific hypothesis: he keeps an eye out for vulnerabilities in popular sites and ran his NodeJS tool against LinkedIn. According to the report, the tool quickly identified a reflected XSS vulnerability. No request, payload, parameter or response is reproduced, so the exact mechanism by which input was reflected is not documented here.

Exploitation

The report contains no exploitation steps. There is no payload, no crafted URL, no HTTP request or response, and no screenshot of the script executing. The only artefact offered for the technical detail is an external link:

Text
https://karthithehacker.com/blogs/linkedin-xss.html

That page is described as holding the proof-of-concept video and technical information. Anyone wanting to reproduce or verify the finding would have to rely on it, because nothing in this write-up shows the vulnerable request.

Root cause

The report does not analyse the cause. Any statement about the underlying defect would be speculation.

Impact

The impact described is the generic consequence of reflected XSS: an attacker who gets a victim to open a crafted link could execute script in the victim's session, which the report says could allow theft of sensitive information such as session cookies, login credentials or personal data, or unauthorised actions on the site. The report gives no affected user population, no preconditions beyond the victim clicking the link, and no evidence of exploitation in the wild. It also records no severity rating, CVSS score or bounty amount.

Fix

It contains no remediation guidance beyond the general point that developers should be aware of potential vulnerabilities in their applications and that regular vulnerability testing matters.

Variants to test

The report's reusable idea is the pipeline, not a payload. The following are concrete extensions of it, each with the signal that would make it worth pursuing:

  1. Run the same recon against sibling properties. Enumerate subdomains with assetfinder, add brute-force results from subsleuth, filter with httpx, and load everything into Burp via burpflow. A positive result is a live host that reflects a marker string from a query parameter back into the HTML response unencoded.
  2. Prioritise parameters that end up in HTML, attributes or script blocks. Send a unique alphanumeric marker in each parameter and search the response body for it. A positive result is the marker appearing verbatim inside an HTML context, especially inside an attribute value or a <script> block, rather than being entity-encoded or dropped.
  3. Check reflection in error and redirect paths. Parameters echoed in error pages or in redirect bodies are common reflection points. A positive result is the marker surviving into the response of a path that is not the normal success page.
  4. Automate detection, verify manually. The author's approach was a custom NodeJS scanner followed by manual confirmation in Burp. A positive result from the scanner only counts once you can show the exact request and the exact response that reflects it, which is precisely the evidence this write-up omits.

Bug report

The report includes a single image under the heading "Bug Report".

From the original on medium.com

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

A security researcher named Karthikeyan.V wrote about finding a reflected cross-site scripting (XSS) problem in LinkedIn. In simple terms, XSS is a way of sneaking a small piece of code into a web page so that another person's browser runs it without them knowing. The researcher says he found one of these in LinkedIn, built a small program to detect it, and published that program for others to use.

A few things are worth knowing before you read on. The report is short on detail about the LinkedIn side: it does not say which LinkedIn page, address, or input field was involved, and it does not show the request that triggered the problem. What it does describe is how the researcher searched for targets, the tool he wrote, and a CVE identifier he attached to the work. A CVE is a public catalogue number for a known security flaw, a bit like a reference number on a recall notice for a faulty product.

From the original on medium.com

The CVE in the title, CVE-2021-31589, is described in the report as a flaw that lets attackers run malicious code on a user's system through a specially crafted URL, and it affects BeyondTrust Secure Remote Access Base Software version 6.0.1 and earlier. BeyondTrust is a different company from LinkedIn. The report does not explain how that CVE relates to the LinkedIn finding beyond the fact that the researcher named his tool after it. So treat the CVE as the label on his tool, not as a description of the LinkedIn problem itself.

What XSS is, from zero

When you visit a website, your browser downloads a page made of instructions (HTML) and runs any small programs (scripts) that come with it. Your browser trusts that those instructions came from the website. XSS abuses that trust: an attacker finds a way to get their own script into the page, and your browser runs it as if the website had written it.

A useful comparison is a noticeboard. If the noticeboard only accepts messages written by staff, you trust what you read there. If a stranger can slip their own note onto the board, you might read it and believe it came from staff. XSS is that stranger's note.

The report explains that the malicious scripts usually run in the victim's browser and can let an attacker steal sensitive information such as session cookies, login credentials, or personal data. A session cookie is a small piece of data your browser stores after you log in, so the site can recognise you on the next page. If someone steals it, they can often act as you without knowing your password.

The report also explains the most common type, called reflected XSS. In a reflected XSS attack, the attacker sends a malicious link to a victim, and the script inside the link runs when the victim clicks it. The server reflects the script back to the victim's browser, which then runs it in the context of the victim's session. Think of a shop assistant who reads your order back to you word for word: if you slip an instruction into the order, the assistant repeats it aloud and someone else follows it.

What CVE-2021-31589 is

The report describes CVE-2021-31589 as a vulnerability that allows attackers to execute malicious code on a user's system through a specially crafted URL. It says the flaw affects BeyondTrust Secure Remote Access Base Software version 6.0.1 and earlier versions. In plain terms, an unauthorised person could insert malicious code into the software, which could lead to unauthorised access to sensitive data.

That is a description of a BeyondTrust product, not LinkedIn.

How the researcher searched for targets

The report describes a three-step process for finding things to test. This kind of searching is often called reconnaissance, or recon: mapping out what a company has on the internet before testing any of it. It is like walking around a building and noting every door before trying any handles.

  1. Find subdomains. A subdomain is a smaller address under a company's main address. If example.com is the main building, mail.example.com and shop.example.com are separate entrances. The researcher uses a tool called assetfinder to list subdomains. Because many other researchers use the same tool and therefore find the same names, he also brute-forces subdomains with subsleuth. Brute forcing means trying a long list of likely names, such as test, dev, or admin, to see which ones exist. The report describes subsleuth as designed for subdomain brute forcing and for discovering subdomains of subdomains.
  2. Check which ones are alive. A listed subdomain may no longer exist or may not respond. The researcher uses httpx to work out which of the discovered domains are active and live. This saves time: there is no point testing a door that has been bricked up.
  3. Test by hand. While the automated tools run, the researcher loads all the recon data into Burp Suite using a tool called burpflow, which he wrote himself. Burp Suite is a program that sits between your browser and a website and lets you read and change every request and response. The report says burpflow creates a proxy and loads the data into Burp in a few seconds, which lets him start manual attacks quickly. A proxy here is simply a middleman that passes your traffic along while letting you inspect it.

Finding the problem

The researcher frames the discovery as the result of routine recon rather than a specific guess. He says he keeps an eye out for potential vulnerabilities in popular websites and applications. He ran a tool he wrote in NodeJS against LinkedIn. NodeJS is a runtime that lets you run JavaScript programs outside a browser, which makes it handy for writing small automation scripts.

According to the report, the tool quickly identified a reflected XSS vulnerability. The report does not reproduce any request, payload, parameter, or response, so the exact way input was reflected is not documented here. A payload in this context is the piece of input an attacker sends in the hope that it gets executed; a parameter is a named value in a web address, the part after a question mark, such as ?search=shoes.

After verifying the vulnerability, the researcher decided to publish the tool as open source so that other enthusiasts could use it to find similar problems in other websites and applications. Open source means the program's code is publicly available for anyone to read and reuse.

The tool

The report gives one link for the tool:

Text
https://github.com/karthi-the-hacker/CVE-2021-31589

This is the address of the tool's public code repository on GitHub.

The bug report

The report includes a single image under the heading "Bug Report".

From the original on medium.com

Proof of concept and technical detail

For the technical detail, the report points to an external page:

Text
https://karthithehacker.com/blogs/linkedin-xss.html

That page is described as holding the proof-of-concept video and technical information. A proof of concept is a small demonstration that shows a problem is real, rather than just theoretical. Anyone wanting to reproduce or verify the finding would have to rely on that page, because nothing in this write-up shows the vulnerable request.

What the impact would be

The impact described is the general consequence of reflected XSS: an attacker who gets a victim to open a crafted link could run script in the victim's session. The report says this could allow theft of sensitive information such as session cookies, login credentials, or personal data, or unauthorised actions on the site. The report gives no affected user population, no preconditions beyond the victim clicking the link, and no evidence of exploitation in the wild. It also records no severity rating, CVSS score, or bounty amount. A CVSS score is a standard number from 0 to 10 that rates how serious a flaw is.

What the cause was

The report does not analyse the cause. It defines reflected XSS in general terms, as a case where a script in a link sent to a victim is reflected back to the victim's browser by the server and runs in the context of the victim's session. Output encoding means converting special characters into harmless text so a browser displays them instead of running them. A content security policy is a set of rules a site sends to the browser saying which scripts are allowed to run. Any statement about the underlying defect would be a guess.

What the fix was

It contains no remediation guidance beyond the general point that developers should be aware of potential vulnerabilities in their applications and that regular vulnerability testing matters.

How you could try the same approach

The reusable idea in the report is the pipeline, not a payload. Here are concrete ways to extend it, each with the signal that would make it worth pursuing.

  1. Run the same recon against sibling properties. Find subdomains with assetfinder, add brute-force results from subsleuth, filter with httpx, and load everything into Burp via burpflow. A positive result is a live host that reflects a marker string from a query parameter back into the HTML response without encoding it. A marker string is a unique word you choose, such as zzq123, so you can search for it later and know it came from you.
  2. Prioritise parameters that end up in HTML, attributes, or script blocks. Send a unique alphanumeric marker in each parameter and search the response body for it. A positive result is the marker appearing verbatim inside an HTML context, especially inside an attribute value or a <script> block, rather than being entity-encoded or dropped. Entity-encoded means special characters have been replaced with safe codes, so < becomes &lt; and the browser shows it as text instead of treating it as code.
  3. Check reflection in error and redirect paths. Parameters echoed in error pages or in redirect bodies are common reflection points. A positive result is the marker surviving into the response of a path that is not the normal success page. A redirect is when a server tells your browser to go to a different address instead.
  4. Automate detection, verify manually. The researcher's approach was a custom NodeJS scanner followed by manual confirmation in Burp. A positive result from the scanner only counts once you can show the exact request and the exact response that reflects it, which is precisely the evidence this write-up omits.

Glossary

  • API: a defined way for one program to talk to another, like a service counter where you make a request and get a response in a fixed format.
  • Attribute: a setting inside an HTML tag, such as the address a link points to.
  • Brute forcing: trying a long list of likely names or values to see which ones exist.
  • Burp Suite: a program that sits between your browser and a website so you can read and change every request and response.
  • Content security policy: rules a site sends to the browser saying which scripts are allowed to run.
  • Cookie: a small piece of data a site stores in your browser, often to remember that you are logged in.
  • CVE: a public catalogue number for a known security flaw, like a reference number on a product recall.
  • CVSS score: a standard number from 0 to 10 that rates how serious a flaw is.
  • Entity encoding: replacing special characters with safe codes, so < becomes &lt; and the browser shows it as text.
  • HTML: the language web pages are written in, made of tags that describe structure and content.
  • httpx: a tool used here to check which discovered domains are active and live.
  • NodeJS: a runtime that lets you run JavaScript programs outside a browser.
  • Open source: a program whose code is publicly available for anyone to read and reuse.
  • Output encoding: converting special characters into harmless text so a browser displays them instead of running them.
  • Parameter: a named value in a web address, the part after a question mark, such as ?search=shoes.
  • Payload: the piece of input an attacker sends in the hope that it gets executed.
  • Proof of concept: a small demonstration that shows a problem is real, rather than just theoretical.
  • Proxy: a middleman that passes your traffic along while letting you inspect it.
  • Reconnaissance (recon): mapping out what a company has on the internet before testing any of it.
  • Redirect: when a server tells your browser to go to a different address.
  • Reflected XSS: a cross-site scripting attack where a script in a link is sent back by the server and runs in the victim's browser.
  • Script: a small program that runs inside a web page.
  • Session: the period during which a site remembers who you are after you log in.
  • Subdomain: a smaller address under a company's main address, such as mail.example.com under example.com.
  • XSS (cross-site scripting): a flaw that lets an attacker get their own script into a web page so another person's browser runs it.

More by Karthikeyan.V

View all

7 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.