CVE-2019-15486: Cross-site Scripting in django-js-reverse

django-js-reverse Updated 02 Oct 2025

Summary

27/08/2019
Yes i
Moderate
6.1

CVE-2019-15486: Cross-site Scripting in django-js-reverse. Affects django-js-reverse versions < 0.9.1. Fixed in 0.9.1. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The django-js-reverse package is a Python package available on PyPI that provides a way to use Django URL reversing directly in JavaScript code. It allows developers to generate JavaScript code that can be used to reverse Django URLs without hardcoding them. This package is commonly used in Django web applications to simplify URL handling and improve maintainability. However, versions of django-js-reverse prior to 0.9.1 are vulnerable to a cross-site scripting (XSS) attack.

Vulnerability Detail

The vulnerability in django-js-reverse (aka Django JS Reverse) before 0.9.1 is due to insufficient input sanitization. An attacker can exploit this vulnerability by injecting malicious JavaScript code into the generated JavaScript code, which is then executed in the context of the victim's browser. This can lead to various security issues, such as session hijacking, defacement of web pages, or theft of sensitive information. The vulnerability has a CVSS score of 6.1, indicating a moderate severity level.

How To Fix

Minimum fixed version

0.9.1

This is the first release that contains the fix.

pip install --upgrade "django-js-reverse==0.9.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, a temporary workaround is to manually sanitize any user-generated input that is used in the generation of JavaScript code. This can be done by using appropriate input validation and escaping techniques to ensure that any potentially malicious code is neutralized. Here is an example of how to sanitize user input in the affected function:

def generate_js(user_input):
    sanitized_input = escape(user_input)
    # Rest of the code

Conclusion

In conclusion, the django-js-reverse package versions prior to 0.9.1 are vulnerable to cross-site scripting (XSS) attacks. It is crucial for developers to upgrade to the latest version or apply the provided workaround to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for django-js-reverse →

Share this vulnerability

FAQ

django-js-reverse is a Python package that allows developers to generate JavaScript code for reversing Django URLs.

This vulnerability allows an attacker to inject malicious JavaScript code into the generated JavaScript code, leading to potential security issues such as session hijacking or theft of sensitive information.

The CVSS score of this vulnerability is 6.1, indicating a moderate severity level.

To fix this vulnerability, it is recommended to upgrade to version 0.9.1 or later of django-js-reverse.

Yes, a temporary workaround is to manually sanitize user-generated input used in the generation of JavaScript code.

Related vulnerabilities

Recent vulnerabilities recorded for django-js-reverse.

How To Fix

Minimum fixed version

0.9.1

This is the first release that contains the fix.

pip install --upgrade "django-js-reverse==0.9.1"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback