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.

[Security] JS challenges vulnerable to XSS

See original GitHub issue

Update: Details hidden, by mod. Update: Details disclosed, by mod.

Hi! Love the purpose of this project but it seems the way some of the JS challenges are set up makes it vulnerable to XSS.

Challenge Name

At least https://www.freecodecamp.org/challenges/sum-all-primes and https://www.freecodecamp.org/challenges/smallest-common-multiple, if not all JS challenges.

Issue Description

JS challenges appear to be vulnerable to XSS via injection in the URL. Examples: https://www.freecodecamp.org/challenges/sum-all-primes#?solution=alert('xss') https://www.freecodecamp.org/challenges/smallest-common-multiple#?solution=alert('xss')

If signed in, observe that alert('xss') executes.

Browser Information

Chrome, but should affect all browsers with appropriate escaping.

I’m not sure how dangerous session hijacking is to your site but thought it’d be worth pointing out. Let me know what you think.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
raisedadeadcommented, Jan 17, 2018

We have fixed this in production. As a side effect, the sharing code URLs from profile, and viewing solutions from profiles is disabled.

This is side effect is temporary and is already handled more elegantly in the beta.

We will soon be adding a more clear warning notice on the profile page, for clarification.

Note: none of the progress is lost, and all submitted solutions are safe in the user’s profiles, except we are temporarily limiting the ability to view and share them.

0reactions
linkennethcommented, Jan 21, 2018

Thanks for the fix! Verified that the issue as it was no longer works. Sorry again for the irresponsible disclosure, hope it didn’t cause too much trouble.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript Security | JavaScript Vulnerabilities - Snyk
The most common JavaScript vulnerabilities include Cross-Site Scripting (XSS), malicious code, Man-in-the-middle attack and exploiting vulnerabilities in the ...
Read more >
Cross Site Scripting (XSS) - OWASP Foundation
XSS can cause a variety of problems for the end user that range in severity from an annoyance to complete account compromise. The...
Read more >
Cross-site Scripting (XSS) challenge - MRunal - Medium
A web page or web application is vulnerable to XSS if it uses unsanitized user input in the output that it generates. This...
Read more >
Most Common Security Vulnerabilities Using JavaScript
According to OWASP, cross-site scripting (XSS) is one of the most widespread security risks in web applications. It occurs when an attacker ...
Read more >
JavaScript security: Vulnerabilities and best practices - Raygun
JavaScript security is a top priority, from programmatic errors and insecure user ... more vulnerable to cross-site scripting (XSS) attacks.
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