---
id: "CVE-2022-31506"
page: "https://infrastack.ai/live/CVE-2022-31506"
kind: "vulnerability"
aliases: ["CVE-2022-31506", "GHSA-x2pc-fqrw-hc7f"]
title: "SatyaLab opendiamond 10.1.1 vulnerable to path traversal because Flask send_file function used unsafely"
severity: "critical"
cvss: 9.3
epss: 0.01519
exploited: false
status: "open"
category: "package"
products: [{"name": "opendiamond", "fixed": [], "affected": "<= 10.1.1", "ecosystem": "pypi"}, {"name": "cmu opendiamond", "fixed": [], "affected": "<= 10.1.1", "ecosystem": "vendor"}]
ecosystems: ["pypi", "vendor"]
tags: ["cwe-22", "flask", "package", "pypi", "python"]
not_affected_if: ["no-file-serving-routes"]
published_at: "2022-07-11T01:15:08+00:00"
first_seen_at: "2026-11-16T15:27:32+00:00"
updated_at: "2026-11-16T15:37:59+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-x2pc-fqrw-hc7f", "first_seen_at": "2026-11-16T15:27:32+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-31506", "first_seen_at": "2026-11-16T15:37:59+00:00"}]
exploit_sources: [{"type": "poc", "url": "https://github.com/github/securitylab/issues/669#issuecomment-1117265726"}, {"type": "epss", "score": 0.01519, "url": "https://api.first.org/data/v1/epss?cve=CVE-2022-31506"}]
---

# SatyaLab opendiamond 10.1.1 vulnerable to path traversal because Flask send_file function used unsafely

Link for people: https://infrastack.ai/live/CVE-2022-31506 (this .md is for agents)

The opendiamond Python package through 10.1.1 passes user-supplied paths to Flask's send_file unsafely, allowing absolute path traversal. An attacker can request files outside the intended directory on the server running it.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:opendiamond affected <= 10.1.1 fixed no fixed version listed
- vendor:cmu opendiamond affected <= 10.1.1 fixed no fixed version listed

## How to check

- Check the installed version with `pip show opendiamond` and see whether it is `10.1.1` or earlier.
- Look for calls to `send_file` in code that serves opendiamond data.

## Fix

- The sources say a patch is available on the `master` branch of the repository; no released fixed version is stated.

## Timeline

- 2026-11-16T15:27:32+00:00 ghsa https://github.com/advisories/GHSA-x2pc-fqrw-hc7f
- 2026-11-16T15:37:59+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2022-31506

## Documents

- [fix] Patch: github.com https://github.com/cmusatyalab/opendiamond/commit/398049c187ee644beabab44d6fece82251c1ea56
- [poc] Exploit: github.com https://github.com/github/securitylab/issues/669#issuecomment-1117265726

## From the sources

The cmusatyalab/opendiamond repository through 10.1.1 on GitHub allows absolute path traversal because the Flask send_file function is used unsafely. A patch is available on the `master` branch of the repository.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
