question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

XSS: Javascript execution through links

See original GitHub issue

Posting this:

[Just Regular Link](javascript:alert(1))

Renders

A link which will show alert on click. Should this be considered an XSS vulnerability and mitigated by library itself or by the users by creating a custom parser?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
vschcommented, Apr 3, 2018

@iamareebjamal, I think an option is needed to filter out some URI formats for links. I will add it. That way custom link resolver will only be needed for special cases.

0reactions
vschcommented, Nov 20, 2018

@bvn13, it is enabled by default but if you want to change the RegEx used for suppressing links you can add .set(HtmlRenderer.SUPPRESSED_LINKS, "your reg ex here") to your Parser/Renderer build options.

See the flexmark-java-samples module directory for examples.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How JavaScript works: 5 types of XSS attacks + tips on ...
The script is activated through a link, which sends a request to the web app with a vulnerability that enables the execution of...
Read more >
Cross Site Scripting (XSS) - OWASP Foundation
Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into otherwise benign and trusted websites.
Read more >
Reflected URL attacks - XSS - Google Sites
Reflected javascript injection vulnerabilities exist when web applications take parameters from the URL and display them on a page. URL reflection XSS ......
Read more >
Cross Site Scripting in JavaScript: Everything You Need to Know
With Cross Site Scripting, attackers execute malicious JavaScript within a victim's browser to steal session cookies and impersonate a user, ...
Read more >
xss - Will JavaScript be executed which is in an HREF?
First, ensure the URL's protocol handler is one of a whitelisted set (e.g., http , https , ftp , mailto ). Then, apply...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found