XSS Vulnerability in Python XML-RPC Server

python3 Updated 02 Oct 2025

Summary

28/09/2019
N/A
Yes i
Medium
6.1

CVE-2019-16935: The documentation XML-RPC server in Python through 2.7.16, 3.x through 3.6.9, and 3.7.x through 3.7.4 has XSS via the server_title field. Affects python3 across 2 version ranges.

< 3.7.5-r0 < c2f86d86e6c8f5fd1ef602128b537a48f3f5c063

Fixed in 3.7.5-r0. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Python is a popular programming language known for its simplicity and versatility. It is widely used for web development, scientific computing, and automation tasks. The XML-RPC server in Python allows remote procedure calls over HTTP, making it a convenient tool for building distributed systems. However, a vulnerability has been discovered in the XML-RPC server that can lead to cross-site scripting (XSS) attacks.

Vulnerability Detail

The vulnerability, identified as CVE-2019-16935, affects Python versions 2.x through 2.7.16, 3.x through 3.6.9, and 3.7.x through 3.7.4. It specifically targets the server_title field in the documentation XML-RPC server. When untrusted input is passed to the set_server_title function, it can result in the delivery of arbitrary JavaScript code to clients visiting the server's HTTP URL. This can enable an attacker to execute malicious actions on the client-side, potentially compromising user data and system security.

How To Fix

Minimum fixed version

3.7.5-r0

This is the first release that contains the fix.

sudo apk add --upgrade python3

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

Workaround

As a workaround, it is advisable to sanitize and validate any user input before passing it to the set_server_title function. This can be achieved by implementing input validation and output encoding techniques to prevent the execution of arbitrary JavaScript code.

Conclusion

The XSS vulnerability in the Python XML-RPC server can have severe consequences, including the execution of arbitrary JavaScript code on client systems. It is crucial to update Python to version 3.7.5 or later and implement input validation and output encoding techniques to mitigate the risk. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for python3 →

Share this vulnerability

FAQ

The vulnerability allows an attacker to inject and execute arbitrary JavaScript code on clients visiting the affected server's HTTP URL. This can lead to various consequences, including unauthorized access to user data, session hijacking, and the potential for further exploitation.

The vulnerability affects Python versions 2.x through 2.7.16, 3.x through 3.6.9, and 3.7.x through 3.7.4. It is crucial to update to Python 3.7.5 or later to address the issue.

To protect your system, it is recommended to update Python to version 3.7.5 or later. Additionally, implementing input validation and output encoding techniques can help mitigate the risk of XSS attacks.

At the time of this report, there are no known public exploits specifically targeting this vulnerability. However, it is essential to apply the recommended updates and security measures to prevent potential exploitation.

For more detailed information about this vulnerability, you can refer to the official CVE-2019-16935 documentation and the provided source links in the vulnerability details section.

Related vulnerabilities

Recent vulnerabilities recorded for python3.

How To Fix

Minimum fixed version

3.7.5-r0

This is the first release that contains the fix.

sudo apk add --upgrade python3

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