CVE-2009-3557 json
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_m…
published 2009-11-23 16 y ago modified 2026-06-16 4 mo ago also EUVD-2009-3538
- cvss
- 5.0
- version 2.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.1%
- EPSS 2.1% chance of exploitation in 30 days, percentile 81%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2009-3557 updated
php: safe_mode / open_basedir security fixes in 5.3.1
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
2.10% chance of exploitation in the next 30 days, higher than 81% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- securityreason.com http://securityreason.com/securityalert/6601 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
Classification
- Weakness
-
- CWE-264 Permissions, Privileges, and Access Controls
- Technology feeds
References
-
openwall.com
/lists/oss-security/2009/11/20/3
mailing-list, patch
-
php.net
/ChangeLog-5.php
patch, vendor-advisory
-
openwall.com
/lists/oss-security/2009/11/20/2
mailing-list, patch
-
php.net
/releases/5_3_1.php
patch, vendor-advisory
-
openwall.com
/lists/oss-security/2009/11/20/5
mailing-list, patch
-
securityreason.com
/securityalert/6601
third-party-advisory, exploit
-
marc.info
/?l=bugtraq&m=127680701405735&w=2
vendor-advisory
-
mandriva.com
/security/advisories?name=MDVSA-2009:285
vendor-advisory
-
lists.apple.com
/archives/security-announce/2010//Mar/msg00001.html
vendor-advisory
-
mandriva.com
/security/advisories?name=MDVSA-2009:302
vendor-advisory
-
mandriva.com
/security/advisories?name=MDVSA-2009:303
vendor-advisory
-
secunia.com
/advisories/37412
third-party-advisory, vendor-advisory
- php.net /releases/5_2_12.php
-
secunia.com
/advisories/40262
third-party-advisory
-
news.php.net
/php.announce/79
mailing-list
-
secunia.com
/advisories/37821
third-party-advisory
- svn.php.net /viewvc/php/php-src/branches/PHP_5_2/ext/standard/file.c?view=log
- support.apple.com /kb/HT4077
-
vupen.com
/english/advisories/2009/3593
vdb-entry
-
oval.cisecurity.org
/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A7396
vdb-entry, signature
- svn.php.net /viewvc?view=revision&revision=288945
- svn.php.net /viewvc/php/php-src/branches/PHP_5_3/ext/standard/file.c?view=log
Sources
- CVE List CVE-2009-3557
- NVD CVE-2009-3557
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.