Every CVE Search/ Get API key

CVE-2026-32722

Memray-generated HTML reports vulnerable to Stored XSS via unescaped command-line metadata

3.6 LowPublic exploitFix available

Memray is a memory profiler for Python. Prior to Memray 1.19.2, Memray rendered the command line of the tracked process directly into generated HTML reports without escaping. Because there was no escaping, attacker-controlled command line arguments were inserted as raw HTML into the generated report. This allowed JavaScript execution when a victim opened the generated report in a browser. Version 1.19.2 fixes the issue.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
None
Availability
None

Exploit likelihood

0.32%Up 0.3 points since Mar 19, 2026
90%50%10%1%

What each source reports

CVE List Score used 3.6

Memray-generated HTML reports vulnerable to Stored XSS via unescaped command-line metadata

Memray is a memory profiler for Python. Prior to Memray 1.19.2, Memray rendered the command line of the tracked process directly into generated HTML reports without escaping. Because there was no escaping, attacker-controlled command line arguments were inserted as raw HTML into the generated report. This allowed JavaScript execution when a victim opened the generated report in a browser. Version 1.19.2 fixes the issue.

Record
CVE-2026-32722
CVSS 3.1
3.6 LowCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
Weakness
CWE-79
Updated
2026-11-02
EUVDEUVD-2026-12970 3.6

Memray is a memory profiler for Python. Prior to Memray 1.19.2, Memray rendered the command line of the tracked process directly into generated HTML reports without escaping. Because there was no escaping, attacker-controlled command line arguments were inserted as raw HTML into the generated report. This allowed JavaScript execution when a victim opened the generated report in a browser. Version 1.19.2 fixes the issue.

Record
EUVD-2026-12970
CVSS 3.1
3.6 LowCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-r5pr-887v-m2w9 3.6

Stored XSS in Memray-generated HTML reports via unescaped command-line metadata

Summary

Prior to Memray 1.19.2, Memray rendered the command line of the tracked process directly into generated HTML reports without escaping. Because there was no escaping, attacker-controlled command line arguments were inserted as raw HTML into the generated report.

This allowed JavaScript execution when a victim opened the generated report in a browser.

Affected Version

  • Memray version: 1.19.1 and earlier

Remediation

Upgrade to Memray 1.19.2, and avoid attaching Memray to untrusted processes until you have upgraded.

Root Cause

Jinja is used to embed the process's command line arguments into the generated flame graph or table report. Memray has not been telling Jinja to HTML escape the command line arguments when writing them into the HTML, leading to a stored XSS vulnerability.

Impact

An attacker who can influence the script name or command-line arguments of a profiled program can inject HTML/JavaScript into Memray-generated HTML reports (both memray flamegraph and memray table reports, both with and without --no-web). When a victim opens the generated report in a browser, the injected JavaScript executes in the context of the report.

Note that in the case of memray attach, the user attaching Memray and generating the report may be a different user than the one who ran the command and set up the command line arguments.

Proof of Concept

Run Memray on a script with an attacker-controlled filename:

touch '<img src=x onerror=alert(1)>'
python -m memray run -o poc.bin '<img src=x onerror=alert(1)>'

Generate a report:

python -m memray flamegraph -o poc.html poc.bin

Observed Result

The generated HTML contains raw unescaped attacker-controlled HTML.

Opening or reloading the generated report in a browser triggers JavaScript execution.

Record
GHSA-r5pr-887v-m2w9
CVSS 3.1
3.6 LowCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
Weakness
CWE-79
Updated
2026-11-02
NVD 3.6

Memray is a memory profiler for Python. Prior to Memray 1.19.2, Memray rendered the command line of the tracked process directly into generated HTML reports without escaping. Because there was no escaping, attacker-controlled command line arguments were inserted as raw HTML into the generated report. This allowed JavaScript execution when a victim opened the generated report in a browser. Version 1.19.2 fixes the issue.

Record
CVE-2026-32722
CVSS 3.1
3.6 LowCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
OSV 3.6

Memray-generated HTML reports vulnerable to Stored XSS via unescaped command-line metadata

Memray is a memory profiler for Python. Prior to Memray 1.19.2, Memray rendered the command line of the tracked process directly into generated HTML reports without escaping. Because there was no escaping, attacker-controlled command line arguments were inserted as raw HTML into the generated report. This allowed JavaScript execution when a victim opened the generated report in a browser. Version 1.19.2 fixes the issue.

Record
CVE-2026-32722
CVSS 3.1
3.6 LowCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
Weakness
CWE-79
Updated
2026-11-02
OSVDEBIAN-CVE-2026-32722 6.1

Memray is a memory profiler for Python. Prior to Memray 1.19.2, Memray rendered the command line of the tracked process directly into generated HTML reports without escaping. Because there was no escaping, attacker-controlled command line arguments were inserted as raw HTML into the generated report. This allowed JavaScript execution when a victim opened the generated report in a browser. Version 1.19.2 fixes the issue.

Record
DEBIAN-CVE-2026-32722
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVGHSA-r5pr-887v-m2w9 3.6

Stored XSS in Memray-generated HTML reports via unescaped command-line metadata

Summary

Prior to Memray 1.19.2, Memray rendered the command line of the tracked process directly into generated HTML reports without escaping. Because there was no escaping, attacker-controlled command line arguments were inserted as raw HTML into the generated report.

This allowed JavaScript execution when a victim opened the generated report in a browser.

Affected Version

  • Memray version: 1.19.1 and earlier

Remediation

Upgrade to Memray 1.19.2, and avoid attaching Memray to untrusted processes until you have upgraded.

Root Cause

Jinja is used to embed the process's command line arguments into the generated flame graph or table report. Memray has not been telling Jinja to HTML escape the command line arguments when writing them into the HTML, leading to a stored XSS vulnerability.

Impact

An attacker who can influence the script name or command-line arguments of a profiled program can inject HTML/JavaScript into Memray-generated HTML reports (both memray flamegraph and memray table reports, both with and without --no-web). When a victim opens the generated report in a browser, the injected JavaScript executes in the context of the report.

Note that in the case of memray attach, the user attaching Memray and generating the report may be a different user than the one who ran the command and set up the command line arguments.

Proof of Concept

Run Memray on a script with an attacker-controlled filename:

touch '<img src=x onerror=alert(1)>'
python -m memray run -o poc.bin '<img src=x onerror=alert(1)>'

Generate a report:

python -m memray flamegraph -o poc.html poc.bin

Observed Result

The generated HTML contains raw unescaped attacker-controlled HTML.

Opening or reloading the generated report in a browser triggers JavaScript execution.

Record
GHSA-r5pr-887v-m2w9
CVSS 3.1
3.6 LowCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
Weakness
CWE-79
Updated
2026-11-02
OSVPYSEC-2026-2203 6.1

Memray is a memory profiler for Python. Prior to Memray 1.19.2, Memray rendered the command line of the tracked process directly into generated HTML reports without escaping. Because there was no escaping, attacker-controlled command line arguments were inserted as raw HTML into the generated report. This allowed JavaScript execution when a victim opened the generated report in a browser. Version 1.19.2 fixes the issue.

Record
PYSEC-2026-2203
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVUBUNTU-CVE-2026-32722 3.6

Memray is a memory profiler for Python. Prior to Memray 1.19.2, Memray rendered the command line of the tracked process directly into generated HTML reports without escaping. Because there was no escaping, attacker-controlled command line arguments were inserted as raw HTML into the generated report. This allowed JavaScript execution when a victim opened the generated report in a browser. Version 1.19.2 fixes the issue.

Record
UBUNTU-CVE-2026-32722
CVSS 3.1
3.6 LowCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
memray
PyPI
before 1.19.2
1.19.2
python-memray
Debian:13
before 1.17.0+dfsg-1+deb13u1, plus listed versions
1.17.0+dfsg-1
1.17.0+dfsg-1+deb13u1
python-memray
Debian:14
before 1.19.3+dfsg-1, plus listed versions
1.17.0+dfsg-1
1.19.3+dfsg-1
memray
PyPI
before 1.19.2, plus listed versions
1.0.01.0.21.0.31.1.01.10.0
Show 28 moreShow less
1.11.01.12.01.13.01.13.11.13.21.13.31.13.41.14.01.15.01.16.01.17.01.17.11.17.21.18.01.19.01.19.11.2.01.3.01.3.11.4.01.4.11.5.01.6.01.7.01.8.01.8.11.9.01.9.1
1.19.2
python-memray
Ubuntu:25.10
All versions, plus listed versions
1.15.0+dfsg-11.17.0+dfsg-1
None known
python-memray
Ubuntu:26.10
All versions, plus listed versions
1.17.0+dfsg-1build1
None known
python-memray
Ubuntu:26.04:LTS
All versions, plus listed versions
1.17.0+dfsg-11.17.0+dfsg-1build1
None known

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
PoC in GitHub0xmrma/CVE-2026-327222026-03-15

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV, PoC in GitHub

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-32722 is a low vulnerability (CVSS 3.6) in Bloomberg Memray, published March 16, 2026. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 0.32%, the 25th percentile. Fixed in memray 1.19.2.

References

Show 4 moreShow less
MoveEnter Open