XSS Vulnerability in Python XML-RPC Server - CVE-2019-16935

python2 Updated 02 Oct 2025

Summary

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

ALPINE-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 python2 versions < 2.7.16-r3. Fixed in 2.7.16-r3. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Python is a widely-used high-level programming language known for its readability and versatility. It supports multiple programming paradigms and is extensively used for web development, data analysis, artificial intelligence, and more. The XML-RPC server in Python allows remote procedure calls using XML, making it easier for applications to communicate over the web. However, certain versions of Python are vulnerable to an XSS attack due to improper handling of user input in the server_title field.

Vulnerability Detail

The vulnerability identified as CVE-2019-16935 affects the documentation XML-RPC server in Python versions up to 2.7.16 and 3.x versions up to 3.7.4. It allows an attacker to exploit the server_title field by injecting arbitrary JavaScript code. If the set_server_title method is called with untrusted input, this malicious script can be executed in the browsers of clients accessing the server, leading to potential data theft or session hijacking.

How To Fix

Minimum fixed version

2.7.16-r3

This is the first release that contains the fix.

sudo apk add --upgrade python2

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

Workaround

As a temporary workaround, avoid using the XML-RPC server or ensure that the server_title is set to a safe, hardcoded value that does not include user input. Additionally, consider implementing input validation and sanitization to prevent untrusted data from being processed.

Conclusion

CVE-2019-16935 is a significant vulnerability affecting certain versions of the Python XML-RPC server, allowing for XSS attacks through improper handling of user input. It is crucial for users to update their Python packages to the patched versions to mitigate this risk and ensure the security of their applications.

See every vulnerability recorded for python2 →

Share this vulnerability

FAQ

CVE-2019-16935 is a vulnerability in the Python XML-RPC server that allows for cross-site scripting (XSS) attacks through the server_title field.

The vulnerability affects Python versions up to 2.7.16 and 3.x versions up to 3.7.4.

Exploiting this vulnerability can lead to arbitrary JavaScript execution in clients' browsers, resulting in data theft, session hijacking, or other malicious activities.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The CVSS score for CVE-2019-16935 is 6.1, indicating a medium severity level.

Related vulnerabilities

Recent vulnerabilities recorded for python2.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

2.7.16-r3

This is the first release that contains the fix.

sudo apk add --upgrade python2

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