{"id":"CVE-2009-3557","aliases":["EUVD-2009-3538","GHSA-6p2r-x9m6-65cq"],"status":"published","title":"The tempnam function in ext/standard/file.c in PHP before 5.2.12 and 5.3.x before 5.3.1 allows...","description":"The tempnam function in ext/standard/file.c in PHP before 5.2.12 and 5.3.x before 5.3.1 allows context-dependent attackers to bypass safe_mode restrictions, and create files in group-writable or world-writable directories, via the dir and prefix arguments.","severity":{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-08","score":0.02096,"percentile":0.81793,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-264"],"published":"2009-11-23T17:00:00Z","modified":"2026-06-16T23:11:51Z","products":[{"vendor":"php","product":"php"}],"references":[{"url":"http://www.openwall.com/lists/oss-security/2009/11/20/3","tags":["mailing-list","x_refsource_MLIST","x_transferred","Patch"]},{"url":"http://www.php.net/releases/5_2_12.php","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"http://secunia.com/advisories/40262","tags":["third-party-advisory","x_refsource_SECUNIA","x_transferred"]},{"url":"http://securityreason.com/securityalert/6601","tags":["third-party-advisory","x_refsource_SREASON","x_transferred","Exploit"]},{"url":"http://news.php.net/php.announce/79","tags":["mailing-list","x_refsource_MLIST","x_transferred"]},{"url":"http://marc.info/?l=bugtraq\u0026m=127680701405735\u0026w=2","tags":["vendor-advisory","x_refsource_HP","x_transferred"]},{"url":"http://www.mandriva.com/security/advisories?name=MDVSA-2009:285","tags":["vendor-advisory","x_refsource_MANDRIVA","x_transferred"]},{"url":"http://secunia.com/advisories/37821","tags":["third-party-advisory","x_refsource_SECUNIA","x_transferred"]},{"url":"http://lists.apple.com/archives/security-announce/2010//Mar/msg00001.html","tags":["vendor-advisory","x_refsource_APPLE","x_transferred"]},{"url":"http://svn.php.net/viewvc/php/php-src/branches/PHP_5_2/ext/standard/file.c?view=log","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"http://www.php.net/ChangeLog-5.php","tags":["x_refsource_CONFIRM","x_transferred","Patch","Vendor Advisory"]},{"url":"http://support.apple.com/kb/HT4077","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"http://www.openwall.com/lists/oss-security/2009/11/20/2","tags":["mailing-list","x_refsource_MLIST","x_transferred","Patch"]},{"url":"http://www.php.net/releases/5_3_1.php","tags":["x_refsource_CONFIRM","x_transferred","Patch","Vendor Advisory"]},{"url":"http://www.vupen.com/english/advisories/2009/3593","tags":["vdb-entry","x_refsource_VUPEN","x_transferred"]},{"url":"http://www.openwall.com/lists/oss-security/2009/11/20/5","tags":["mailing-list","x_refsource_MLIST","x_transferred","Patch"]},{"url":"http://secunia.com/advisories/37412","tags":["third-party-advisory","x_refsource_SECUNIA","x_transferred","Vendor Advisory"]},{"url":"http://www.mandriva.com/security/advisories?name=MDVSA-2009:302","tags":["vendor-advisory","x_refsource_MANDRIVA","x_transferred"]},{"url":"https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A7396","tags":["vdb-entry","signature","x_refsource_OVAL","x_transferred"]},{"url":"http://svn.php.net/viewvc?view=revision\u0026revision=288945","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"http://www.mandriva.com/security/advisories?name=MDVSA-2009:303","tags":["vendor-advisory","x_refsource_MANDRIVA","x_transferred"]},{"url":"http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/standard/file.c?view=log","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2009-3557"},{"url":"https://github.com/advisories/GHSA-6p2r-x9m6-65cq"}],"sources":{"cve":[{"id":"CVE-2009-3557","description":"The tempnam function in ext/standard/file.c in PHP before 5.2.12 and 5.3.x before 5.3.1 allows context-dependent attackers to bypass safe_mode restrictions, and create files in group-writable or world-writable directories, via the dir and prefix arguments.","status":"published","published":"2009-11-23T17:00:00Z","modified":"2024-08-07T06:31:10.549Z","updated_at":"2026-11-02T14:33:24.10565Z"}],"euvd":[{"id":"EUVD-2009-3538","description":"The tempnam function in ext/standard/file.c in PHP before 5.2.12 and 5.3.x before 5.3.1 allows context-dependent attackers to bypass safe_mode restrictions, and create files in group-writable or world-writable directories, via the dir and prefix arguments.","status":"published","published":"2009-11-23T17:00:00Z","modified":"2024-08-07T06:31:10Z","updated_at":"2026-11-03T01:39:13.262818Z"}],"ghsa":[{"id":"GHSA-6p2r-x9m6-65cq","title":"The tempnam function in ext/standard/file.c in PHP before 5.2.12 and 5.3.x before 5.3.1 allows...","description":"The tempnam function in ext/standard/file.c in PHP before 5.2.12 and 5.3.x before 5.3.1 allows context-dependent attackers to bypass safe_mode restrictions, and create files in group-writable or world-writable directories, via the dir and prefix arguments.","status":"published","published":"2022-05-02T03:46:22Z","modified":"2023-01-31T05:09:14Z","updated_at":"2026-11-02T14:49:29.970425Z"}],"nvd":[{"id":"CVE-2009-3557","description":"The tempnam function in ext/standard/file.c in PHP before 5.2.12 and 5.3.x before 5.3.1 allows context-dependent attackers to bypass safe_mode restrictions, and create files in group-writable or world-writable directories, via the dir and prefix arguments.","status":"published","published":"2009-11-23T17:30:00.467Z","modified":"2026-06-16T23:11:51.543Z","cvss":[{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-264"],"updated_at":"2026-11-02T14:01:37.939838Z"}]}}
