{"id":"CVE-2022-31506","kind":"vulnerability","aliases":["CVE-2022-31506","GHSA-x2pc-fqrw-hc7f"],"related":[],"title":"SatyaLab opendiamond 10.1.1 vulnerable to path traversal because Flask send_file function used unsafely","description":"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.","summary":"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.","severity":"critical","cvss":9.3,"epss":0.01519,"exploited":false,"exploited_at":null,"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"],"how_to_check":"- Check the installed version with `pip show opendiamond` and see whether it is `10.1.1` or earlier.\n- 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.","status":"open","published_at":"2022-07-11T01:15:08+00:00","first_seen_at":"2026-11-16T15:27:32+00:00","triaged_at":"2026-11-16T15:29:36+00:00","updated_at":"2026-11-16T15:37:59+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-11-16T15:29:36Z","model":"claude-haiku-5-5","output":{"fix":"- The sources say a patch is available on the `master` branch of the repository; no released fixed version is stated.","reach":"network","title":"opendiamond: path traversal lets remote users read arbitrary server files","impact":"high","summary":"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.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","pypi","flask"],"confidence":0.6,"fix_status":"available","needs_auth":"unknown","worst_case":"remote requests read arbitrary files from the server","analyst_note":"Confirm the exact fixed release on PyPI and which endpoint is exposed; the GHSA page at https://github.com/advisories/GHSA-x2pc-fqrw-hc7f may name it.","how_to_check":"- Check the installed version with `pip show opendiamond` and see whether it is `10.1.1` or earlier.\n- Look for calls to `send_file` in code that serves opendiamond data.","plain_action":"","product_name":"","needs_analyst":true,"not_affected_if":["no-file-serving-routes"],"who_is_affected":"Teams running opendiamond 10.1.1 or earlier as a web service that serves files, where request paths reach send_file. Systems that only import the library without exposing its file-serving routes are less exposed; the sources do not say more.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"unknown","severity_if_unknown":"unknown"},"cost_usd":0.00073,"input_tokens":4596,"output_tokens":540,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2022':16A,24A '-22':30B '-31506':17A,25A '10.1.1':3A,40B,73C 'absolut':53B,77C 'allow':52B,76C 'attack':57B 'avail':92C 'branch':96C 'cmu':27A 'cmusatyalab/opendiamond':70C 'cve':15A,23A 'cwe':29B 'directori':64B 'file':11A,50B,60B,84C 'flask':9A,31B,47B,82C 'fqrw':21A 'function':12A,85C 'ghsa':19A 'ghsa-x2pc-fqrw-hc7f':18A 'github':75C 'hc7f':22A 'intend':63B 'master':95C 'opendiamond':2A,26A,28A,36B 'outsid':61B 'packag':32B,38B 'pass':41B 'patch':90C 'path':6A,45B,54B,78C 'pypi':33B 'python':34B,37B 'repositori':71C,99C 'request':59B 'run':68B 'satyalab':1A 'send':10A,49B,83C 'server':67B 'suppli':44B 'travers':7A,55B,79C 'unsaf':14A,51B,88C 'use':13A,87C 'user':43B 'user-suppli':42B 'vulner':4A 'x2pc':20A","nicknames":[],"mitigations":[],"who_affected":"Teams running opendiamond 10.1.1 or earlier as a web service that serves files, where request paths reach send_file. Systems that only import the library without exposing its file-serving routes are less exposed; the sources do not say more.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":["cmuopendiamond","opendiamond"],"ptokens":["cmu","opendiamond"],"labels":["critical","cwe22","flask","package","pypi","python","vendor"],"campaign_type":null,"search_a":"'-2022':16A,24A '-31506':17A,25A '10.1.1':3A 'cmu':27A 'cve':15A,23A 'file':11A 'flask':9A 'fqrw':21A 'function':12A 'ghsa':19A 'ghsa-x2pc-fqrw-hc7f':18A 'hc7f':22A 'opendiamond':2A,26A,28A 'path':6A 'satyalab':1A 'send':10A 'travers':7A 'unsaf':14A 'use':13A 'vulner':4A 'x2pc':20A","search_b":"'-22':30B '10.1.1':40B 'absolut':53B 'allow':52B 'attack':57B 'cwe':29B 'directori':64B 'file':50B,60B 'flask':31B,47B 'intend':63B 'opendiamond':36B 'outsid':61B 'packag':32B,38B 'pass':41B 'path':45B,54B 'pypi':33B 'python':34B,37B 'request':59B 'run':68B 'send':49B 'server':67B 'suppli':44B 'travers':55B 'unsaf':51B 'user':43B 'user-suppli':42B","search_c":"'10.1.1':73C 'absolut':77C 'allow':76C 'avail':92C 'branch':96C 'cmusatyalab/opendiamond':70C 'file':84C 'flask':82C 'function':85C 'github':75C 'master':95C 'patch':90C 'path':78C 'repositori':71C,99C 'send':83C 'travers':79C 'unsaf':88C 'use':87C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2022-07-11T01:15:08+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:L","cvss_by":"GitHub","poc_count":1,"sources":[{"source":"ghsa","external_id":"GHSA-x2pc-fqrw-hc7f","url":"https://github.com/advisories/GHSA-x2pc-fqrw-hc7f","severity":"critical","published_at":"2022-07-12T00:00:57+00:00","modified_at":"2026-11-16T15:25:54+00:00","first_seen_at":"2026-11-16T15:27:32+00:00","fetched_at":"2026-11-16T15:36:40+00:00","note":null},{"source":"nvd","external_id":"CVE-2022-31506","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31506","severity":null,"published_at":"2022-07-11T01:15:08+00:00","modified_at":"2026-06-17T04:45:35+00:00","first_seen_at":"2026-11-16T15:37:59+00:00","fetched_at":"2026-11-16T15:37:59+00:00","note":null}],"documents":[{"id":170394,"url":"https://github.com/cmusatyalab/opendiamond/commit/398049c187ee644beabab44d6fece82251c1ea56","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":170677,"url":"https://github.com/github/securitylab/issues/669#issuecomment-1117265726","title":"Exploit: github.com","kind":"poc","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"poc","confidence":null,"note":"Exploit: github.com"}],"disclosures":[],"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"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}