{"id":"CVE-2026-120641","kind":"vulnerability","aliases":["CVE-2026-120641"],"related":[],"title":"Perl CGI module: upload filenames keep client-supplied path components","description":"CGI versions before 5.00 for Perl return upload filenames with any client-supplied path, including ../ and Windows paths.\n\nThe name returned for an uploaded file is the filename parameter of the part's Content-Disposition header, unchanged.\n\nAn application that saves the upload under this name can be made to write outside the intended directory.","summary":"CGI.pm versions before 5.00 return the filename of an uploaded file exactly as the client sent it, including ../ sequences and Windows paths. An application that saves uploads under that name can be tricked into writing files outside its intended directory.","severity":"unknown","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["cgi","package","perl","web-apps"],"not_affected_if":["generated-filenames","no-file-uploads"],"how_to_check":"- Check the installed CGI module version with `perl -MCGI -e 'print $CGI::VERSION'`\n- Search application code for calls that take the upload filename and save the file under it without stripping the path","fix":"- CGI for Perl: `5.00` or later (per the NVD description)","status":"open","published_at":"2026-11-04T00:17:25+00:00","first_seen_at":"2026-11-04T00:46:17+00:00","triaged_at":"2026-11-04T00:48:14+00:00","updated_at":"2026-11-04T00:48:14+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-11-04T00:48:14Z","model":"claude-haiku-5-5","output":{"fix":"- CGI for Perl: `5.00` or later (per the NVD description)","reach":"internet","title":"Perl CGI module: upload filenames keep client-supplied path components","impact":"high","summary":"CGI.pm versions before 5.00 return the filename of an uploaded file exactly as the client sent it, including ../ sequences and Windows paths. An application that saves uploads under that name can be tricked into writing files outside its intended directory.","audience":"developers","category":"package","nicknames":[],"who_cares":["perl","cgi","web-apps"],"confidence":0.6,"fix_status":"available","needs_auth":"unknown","worst_case":"Attacker writes files to arbitrary paths on the server","analyst_note":"Confirm the affected version range and fixed release from the linked patch and the NVD entry; the sources give only the 5.00 threshold.","how_to_check":"- Check the installed CGI module version with `perl -MCGI -e 'print $CGI::VERSION'`\n- Search application code for calls that take the upload filename and save the file under it without stripping the path\n- unknown for anything beyond that","plain_action":"","needs_analyst":true,"not_affected_if":["no-file-uploads","generated-filenames"],"who_is_affected":"Applications that use the Perl CGI module to accept file uploads and save them using the client-supplied filename are exposed. Applications that do not handle file uploads, or that generate their own storage names, are not affected by this flaw.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"unknown"},"cost_usd":0.000684,"input_tokens":4133,"output_tokens":541,"severity_before":"unknown"},"analyst_status":null,"analyst_note":null,"search":"'-120641':14A,17A '-2026':13A,16A '5.00':27B,67C 'app':23B 'applic':47B,104C 'cgi':2A,18B,64C 'cgi.pm':24B 'client':8A,38B,76C 'client-suppli':7A,75C 'compon':11A 'content':99C 'content-disposit':98C 'cve':12A,15A 'directori':63B,120C 'disposit':100C 'exact':35B 'file':34B,59B,89C 'filenam':5A,30B,72C,92C 'header':101C 'includ':41B,79C 'intend':62B,119C 'keep':6A 'made':114C 'modul':3A 'name':53B,84C,111C 'outsid':60B,117C 'packag':19B 'paramet':93C 'part':96C 'path':10A,45B,78C,82C 'perl':1A,20B,69C 'return':28B,70C,85C 'save':49B,106C 'sent':39B 'sequenc':42B 'suppli':9A,77C 'trick':56B 'unchang':102C 'upload':4A,33B,50B,71C,88C,108C 'version':25B,65C 'web':22B 'web-app':21B 'window':44B,81C 'write':58B,116C","nicknames":[],"mitigations":[],"who_affected":"Applications that use the Perl CGI module to accept file uploads and save them using the client-supplied filename are exposed. Applications that do not handle file uploads, or that generate their own storage names, are not affected by this flaw.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["cgi","package","perl","unknown","webapps"],"campaign_type":null,"first_public_at":"2026-11-04T00:17:25+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-120641","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-120641","severity":null,"published_at":"2026-11-04T00:17:25+00:00","modified_at":"2026-11-04T00:17:25+00:00","first_seen_at":"2026-11-04T00:46:17+00:00","fetched_at":"2026-11-04T00:46:17+00:00","note":null}],"documents":[{"id":62121,"url":"https://github.com/leejo/CGI.pm/commit/5379eb18e87b7f985613f5c4f7bae94478a4fa2f.patch","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"}],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}