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.

URGENT: Possible vulnerability to injection attacks

See original GitHub issue

Problem: inserting arbitrary JavaScript into documents is possible, and it will execute. It also seems to cause the entire rest of the page to not render. The person with edit permission to the document cannot then remove the JS, because the edit field is also blanked out.

Solution: disable <script> tags. Do not allow execution of any JavaScript entered by the users.

For an example, try creating a new blank document, entering some dummy text, and then pasting this at the bottom:

<script> document.title = "The title"; </script> Or, see this document (and its source, which is available).

Note that the title in your web browser changes.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jimcullenauscommented, Jan 3, 2018

I cannot see any legitimate reason to use JavaScript in a homebrewery document. Homebrewery is for building up pages that look high-quality like the D&D published books. There’s no room for dynamic content in that. All it does is increase the attack surface.

0reactions
calculuschildcommented, May 9, 2020

Closing because this appears to be solved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Protect Against SQL Injection Attacks
This technique is made possible because of improper coding of vulnerable web applications. These flaws arise because entry fields made available for user...
Read more >
A03 Injection - OWASP Top 10:2021
An application is vulnerable to attack when: ... Some of the more common injections are SQL, NoSQL, OS command, Object Relational Mapping (ORM),...
Read more >
What is SQL Injection? Attack Examples & Prevention - Rapid7
If completed successfully, SQL injections have the potential to be incredibly detrimental to any business or individual. Once sensitive data is compromised in ......
Read more >
Top 5 most dangerous injection attacks | Invicti
Injection attacks exploit a variety of vulnerabilities to inject malicious user input to be executed by a web application.
Read more >
OWASP Top 10 in 2021: Injection Practical Overview
In general terms, an application is vulnerable to injection attacks when it is not properly equipped to deal with unexpected commands or ...
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