{"id":2379,"cve":"CVE-2026-81180","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-81180\/","cwe":"CWE-20","cwe_number":20,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/20","cvss_score":8.8,"published":"2026-09-18","owasp":"A08 Software and Data Integrity Failures","odc":"Timing\/Serialization","cdc":"Timing Issues","category":"Race Conditions","subcategory":"Race Condition in File Operations","scope":"Remote","impact":"Arbitrary Code Execution","summary":"Image upload triggers Ghostscript, GnuPG race writes Python for code exec.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-81180\/","description":"SysReptor is a fully customizable pentest reporting platform. Prior to 2026.61, authenticated users of SysReptor Professional can upload image files whose formats cause image processing to invoke Ghostscript, allowing embedded PostScript to operate in the shared temporary directory. An attacker can combine that behavior with a race involving GnuPG configuration files in temporary subdirectories to cause GnuPG to copy attacker-controlled Python code into the application code directory. The injected code executes with the privileges of the SysReptor application process after a worker restart. The Community edition is not affected. Version 2026.58 contains a partial mitigation, and this issue is fully fixed in version 2026.61.","solution":"Upgrade to SysReptor Professional version\u202f2026.61 (or later).","affected_component":"SysReptor","fixed_by_upgrading":false,"vulnerable_code":"import os\nimport subprocess\nimport tempfile\n\ndef verify_image_upload(image_path):\n    # VULNERABLE: predictable, world-writable temporary directory used for GnuPG\n    temp_dir = f\"\/tmp\/gnupg_{os.getuid()}\"\n    os.makedirs(temp_dir, exist_ok=True)\n    subprocess.run([\"gs\", \"-dNOPAUSE\", \"-sDEVICE=pngalpha\", \"-sOutputFile=\/dev\/null\", image_path])\n    env = os.environ.copy()\n    env[\"GNUPGHOME\"] = temp_dir\n    subprocess.run([\"gpg\", \"--batch\", \"--verify\", \"uploaded.sig\"], env=env)\n    os.rmdir(temp_dir)\n","patched_code":"import os\nimport subprocess\nimport tempfile\n\ndef verify_image_upload(image_path):\n    # FIX: securely generated temporary directory with restrictive permissions\n    temp_dir = tempfile.mkdtemp(prefix=\"gnupg_\", dir=\"\/tmp\")\n    os.chmod(temp_dir, 0o700)\n    subprocess.run([\"gs\", \"-dSAFER\", \"-dNOPAUSE\", \"-sDEVICE=pngalpha\", \"-sOutputFile=\/dev\/null\", image_path])\n    env = os.environ.copy()\n    env[\"GNUPGHOME\"] = temp_dir\n    subprocess.run([\"gpg\", \"--batch\", \"--verify\", \"uploaded.sig\"], env=env)\n    os.rmdir(temp_dir)\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[{"repository":"Syslifters\/sysreptor","commit_url":"https:\/\/github.com\/Syslifters\/sysreptor\/commit\/7d800e5c737df0dbc3d4ea2d095c89235790a1cc","commit_subject":"Harden gpg options","units":[{"file":"api\/src\/sysreptor\/utils\/crypto\/pgp.py","function":"create_gpg"}]},{"repository":"Syslifters\/sysreptor","commit_url":"https:\/\/github.com\/Syslifters\/sysreptor\/commit\/7ecf56a6b8e5c05a2d2212bc8aa340f69855cdea","commit_subject":"Vulnerability fixes","units":[{"file":"api\/src\/sysreptor\/api_utils\/signals.py","function":"check_configuration"},{"file":"api\/src\/sysreptor\/api_utils\/views.py","function":"PublicUtilsViewSet.settings_endpoint"},{"file":"api\/src\/sysreptor\/conf\/settings.py","function":null},{"file":"api\/src\/sysreptor\/users\/permissions.py","function":"ForgotPasswordPermissions.has_permission"},{"file":"api\/src\/sysreptor\/utils\/files.py","function":null},{"file":"api\/src\/sysreptor\/utils\/files.py","function":"compress_image"}]},{"repository":"Syslifters\/sysreptor","commit_url":"https:\/\/github.com\/Syslifters\/sysreptor\/commit\/e8bd31cb42a15a10bb5102337b55dde704be397f","commit_subject":"Remove ghostscript","units":[{"file":"api\/src\/sysreptor\/conf\/settings.py","function":null},{"file":"api\/src\/sysreptor\/pentests\/rendering\/entry.py","function":"render_pdf"},{"file":"api\/src\/sysreptor\/pentests\/rendering\/entry.py","function":"render_pdf_task"},{"file":"api\/src\/sysreptor\/pentests\/rendering\/render.py","function":null},{"file":"api\/src\/sysreptor\/pentests\/rendering\/render.py","function":"render_pdf_impl"},{"file":"api\/src\/sysreptor\/pentests\/rendering\/tasks.py","function":"render_pdf_task_async"},{"file":"api\/src\/sysreptor\/pentests\/views.py","function":"PentestProjectViewSet.generate"}]},{"repository":"Syslifters\/sysreptor","commit_url":"https:\/\/github.com\/Syslifters\/sysreptor\/commit\/f5ad35b9e71d370b5e06ef4680979cb05c24ff3c","commit_subject":"Restrict pillow image formats in Image.open","units":[{"file":"api\/src\/sysreptor\/conf\/settings.py","function":null},{"file":"api\/src\/sysreptor\/pentests\/rendering\/render_weasyprint.py","function":null},{"file":"api\/src\/sysreptor\/utils\/files.py","function":null},{"file":"api\/src\/sysreptor\/utils\/files.py","function":"compress_image"}]}],"references":null}