CVE-2026-32722: Memray Stored XSS via Unescaped Command-Line Metadata

memray Updated 16 Mar 2026

Summary

16/03/2026
Yes i
Low
3.6

CVE-2026-32722: Stored XSS in Memray-generated HTML reports via unescaped command-line metadata. Affects memray versions < 1.19.2. Fixed in 1.19.2. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Memray is a powerful memory profiler for Python applications, designed to help developers analyze memory usage and identify memory leaks. It generates detailed reports, including flame graphs and tables, to visualize memory allocation. However, prior to version 1.19.2, Memray had a critical vulnerability that allowed for stored cross-site scripting (XSS) attacks through unescaped command-line metadata in its generated HTML reports.

Vulnerability Detail

The vulnerability arises from Memray's use of Jinja to embed command-line arguments directly into HTML reports without proper HTML escaping. This oversight allows an attacker to inject malicious HTML or JavaScript into the reports. When a victim opens the report in a browser, the injected JavaScript executes in the context of the report, potentially leading to data theft or session hijacking. The vulnerability affects Memray versions 1.19.1 and earlier, making it crucial for users to upgrade to the patched version to mitigate risks.

How To Fix

Minimum fixed version

1.19.2

This is the first release that contains the fix.

pip install --upgrade "memray==1.19.2"

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

Workaround

As a temporary workaround, avoid using Memray with untrusted command-line arguments or scripts until you can upgrade to version 1.19.2. Additionally, consider sanitizing any command-line inputs to prevent potential XSS attacks.

Conclusion

In summary, CVE-2026-32722 is a stored XSS vulnerability in Memray that can lead to serious security issues if exploited. Users are strongly advised to upgrade to version 1.19.2 or later to protect against this vulnerability. Additionally, using Vulert can help monitor for such vulnerabilities in real-time.

See every vulnerability recorded for memray →

Share this vulnerability

FAQ

The vulnerability is a stored cross-site scripting (XSS) issue that allows attackers to inject malicious scripts into Memray-generated HTML reports.

Memray versions 1.19.1 and earlier are affected by this vulnerability.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected by this vulnerability without any signup.

The CVSS score of this vulnerability is 3.6, indicating a low severity level.

If you cannot upgrade immediately, avoid using Memray with untrusted command-line arguments and consider sanitizing inputs to mitigate potential risks.

How To Fix

Minimum fixed version

1.19.2

This is the first release that contains the fix.

pip install --upgrade "memray==1.19.2"

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