CVE-2021-20848: Cross-site Scripting in github.com/schollz/rwtxt
Summary
CVE-2021-20848: Cross-site Scripting in github.com/schollz/rwtxt. Affects github.com/schollz/rwtxt versions < 1.8.6. Fixed in 1.8.6. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The package github.com/schollz/rwtxt is a Go package that provides functionality for the rwtxt application. rwtxt is a simple and open-source web-based personal wiki and note-taking tool. It allows users to create and manage plain text documents in a web browser. The package is vulnerable to a cross-site scripting (XSS) attack.
Vulnerability Detail
The vulnerability in rwtxt versions prior to v1.8.6 allows a remote attacker to inject an arbitrary script via unspecified vectors. This means that an attacker can craft a malicious script and inject it into the rwtxt application, which will then be executed by the victim's browser. This can lead to various security risks, such as stealing sensitive information, session hijacking, or performing actions on behalf of the victim.
How To Fix
Latest published version: v1.8.6 as of 23 Oct 2026
go get github.com/schollz/rwtxt@v1.8.6
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.8.6
This is the first release that contains the fix.
go get github.com/schollz/rwtxt@v1.8.6
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to update to the fixed version of rwtxt to mitigate the risk of exploitation.
Conclusion
The vulnerability in github.com/schollz/rwtxt allows for cross-site scripting attacks, which can have severe consequences for users of the rwtxt application. It is highly recommended to update to version 1.8.6 or later to mitigate the risk of exploitation. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for github.com/schollz/rwtxt →
FAQ
rwtxt is a web-based personal wiki and note-taking tool.
Cross-site scripting is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users.
The consequences of this vulnerability include the potential theft of sensitive information, session hijacking, and unauthorized actions performed on behalf of the victim.
To fix this vulnerability, update your rwtxt installation to version 1.8.6 or later.
No, there is no known workaround. It is crucial to update to the fixed version of rwtxt.