{"id":"CVE-2018-19296","aliases":["DEBIAN-CVE-2018-19296","DLA-1591-1","DSA-4351-1","EUVD-2020-0340","GHSA-7w4p-72j7-v7c2","MGASA-2019-0010","UBUNTU-CVE-2018-19296","USN-5956-1"],"status":"published","title":"Phar object injection in PHPMailer","description":"PHPMailer before 5.2.27 and 6.x before 6.0.6 is vulnerable to an object injection attack.","severity":{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.02229,"percentile":0.82878,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1321","CWE-502","CWE-915"],"published":"2018-11-16T09:00:00Z","modified":"2026-10-24T10:49:38Z","fixes":[{"ecosystem":"Packagist","package":"phpmailer/phpmailer","fixed_in":["5.2.27","6.0.6"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"libphp-phpmailer","fixed_in":["5.2.14+dfsg-2.4"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"libphp-phpmailer","fixed_in":["5.2.14+dfsg-2.4"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"libphp-phpmailer","fixed_in":["5.2.14+dfsg-2.4"],"sources":["osv"]},{"ecosystem":"Debian:9","package":"libphp-phpmailer","fixed_in":["5.2.14+dfsg-2.3+deb9u1"],"sources":["osv"]},{"ecosystem":"Mageia:6","package":"php-phpmailer","fixed_in":["5.2.27-1.1.mga6"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:16.04:LTS","package":"libphp-phpmailer","fixed_in":["5.2.14+dfsg-1ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:18.04:LTS","package":"libphp-phpmailer","fixed_in":["5.2.14+dfsg-2.3+deb9u1build0.18.04.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"phpmailer/phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.0.0"},{"fixed":"5.2.27"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"phpmailer/phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.0.0"},{"fixed":"6.0.6"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"libphp-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.14+dfsg-2.4"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"libphp-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.14+dfsg-2.4"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"libphp-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.14+dfsg-2.4"}]}]},{"source":"osv","ecosystem":"Debian:8","package":"libphp-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.9+dfsg-2+deb8u4"}]}],"versions":["5.2.9+dfsg-2","5.2.9+dfsg-2+deb8u1","5.2.9+dfsg-2+deb8u2","5.2.9+dfsg-2+deb8u3"],"bundled":2},{"source":"osv","ecosystem":"Debian:9","package":"libphp-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.14+dfsg-2.3+deb9u1"}]}],"versions":["5.2.14+dfsg-2.3"]},{"source":"osv","ecosystem":"Packagist","package":"phpmailer/phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.0.0"},{"fixed":"5.2.27"}]}],"versions":["v5.2.10","v5.2.11","v5.2.12","v5.2.13","v5.2.14","v5.2.15","v5.2.16","v5.2.17","v5.2.18","v5.2.19","v5.2.2","v5.2.20","v5.2.21","v5.2.22","v5.2.23","v5.2.24","v5.2.25","v5.2.26","v5.2.4","v5.2.5","v5.2.6","v5.2.7","v5.2.8","v5.2.9"]},{"source":"osv","ecosystem":"Packagist","package":"phpmailer/phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.0.0"},{"fixed":"6.0.6"}]}],"versions":["v6.0.0","v6.0.1","v6.0.2","v6.0.3","v6.0.4","v6.0.5"]},{"source":"osv","ecosystem":"Mageia:6","package":"php-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.27-1.1.mga6"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"libphp-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.14+dfsg-1ubuntu0.1~esm1"}]}],"versions":["5.2.10+dfsg-1","5.2.14+dfsg-1","5.2.14+dfsg-1build1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"libphp-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.14+dfsg-2.3+deb9u1build0.18.04.1"}]}],"versions":["5.2.14+dfsg-2.3"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"libphp-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.14+dfsg-1ubuntu0.1~esm1"}]}],"versions":["5.2.10+dfsg-1","5.2.14+dfsg-1","5.2.14+dfsg-1build1"],"bundled":7},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"libphp-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.2.14+dfsg-2.3+deb9u2ubuntu0.1~esm1"}]}],"versions":["5.2.14+dfsg-2.3","5.2.14+dfsg-2.3+deb9u1build0.18.04.1","5.2.14+dfsg-2.3+deb9u2build0.18.04.1"],"bundled":7},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"libphp-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.0.6-0.1ubuntu0.1~esm1"}]}],"versions":["6.0.6-0.1"],"bundled":7},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"libphp-phpmailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.2.0-2ubuntu0.1~esm1"}]}],"versions":["6.2.0-2"],"bundled":7}],"products":[{"vendor":"debian","product":"debian_linux"},{"vendor":"fedoraproject","product":"fedora"},{"vendor":"phpmailer_project","product":"phpmailer"},{"vendor":"wordpress","product":"wordpress"}],"references":[{"url":"https://github.com/PHPMailer/PHPMailer/releases/tag/v5.2.27","tags":["x_refsource_MISC","x_transferred","Release Notes","Vendor Advisory","advisory","web","report"]},{"url":"https://lists.debian.org/debian-lts-announce/2018/12/msg00020.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory","web"]},{"url":"https://www.debian.org/security/2018/dsa-4351","tags":["vendor-advisory","x_refsource_DEBIAN","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/PHPMailer/PHPMailer/releases/tag/v6.0.6","tags":["x_refsource_MISC","x_transferred","Release Notes","Vendor Advisory","advisory","web","report"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KPU66INRFY5BQ3ESVPRUXJR4DXQAFJVT/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3B5WDPGUFNPG4NAZ6G4BZX43BKLAVA5B/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"https://github.com/PHPMailer/PHPMailer/security/advisories/GHSA-7w4p-72j7-v7c2","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-19296","tags":["advisory"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/phpmailer/phpmailer/CVE-2018-19296.yaml","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3B5WDPGUFNPG4NAZ6G4BZX43BKLAVA5B/"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KPU66INRFY5BQ3ESVPRUXJR4DXQAFJVT/"},{"url":"https://github.com/advisories/GHSA-7w4p-72j7-v7c2"},{"url":"https://security-tracker.debian.org/tracker/CVE-2018-19296","tags":["advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3B5WDPGUFNPG4NAZ6G4BZX43BKLAVA5B","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KPU66INRFY5BQ3ESVPRUXJR4DXQAFJVT","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3B5WDPGUFNPG4NAZ6G4BZX43BKLAVA5B","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KPU66INRFY5BQ3ESVPRUXJR4DXQAFJVT","tags":["web"]},{"url":"https://advisories.mageia.org/MGASA-2019-0010.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=24055","tags":["report"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/thread/DAZQPUD7WZXMJ2KIQY5P2I2UI545YPYO/","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2018-19296","tags":["report"]},{"url":"https://github.com/PHPMailer/PHPMailer/commit/f1231a9771505f4f34da060390d82eadb8448271","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-5956-1","tags":["advisory"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2018-19296","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2016-10033","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2016-10045","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2017-5223","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2017-11503","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2020-13625","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2021-3603","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2018-19296","description":"PHPMailer before 5.2.27 and 6.x before 6.0.6 is vulnerable to an object injection attack.","status":"published","published":"2018-11-16T09:00:00Z","modified":"2024-08-05T11:30:04.081Z","updated_at":"2026-11-02T14:35:02.966615Z"}],"euvd":[{"id":"EUVD-2020-0340","description":"PHPMailer before 5.2.27 and 6.x before 6.0.6 is vulnerable to an object injection attack.","status":"published","published":"2018-11-16T09:00:00Z","modified":"2024-08-05T11:30:04Z","updated_at":"2026-11-03T02:39:33.782065Z"}],"ghsa":[{"id":"GHSA-7w4p-72j7-v7c2","title":"Phar object injection in PHPMailer","description":"PHPMailer versions prior to 6.0.6 and 5.2.27 are vulnerable to an object injection attack by passing phar:// paths into `addAttachment()` and other functions that may receive unfiltered local paths, possibly leading to RCE. See [this article](https://knasmueller.net/5-answers-about-php-phar-exploitation) for more info on this type of vulnerability. Mitigated by blocking the use of paths containing URL-protocol style prefixes such as `phar://`. Reported by Sehun Oh of cyberone.kr.\n\n### Impact\nObject injection, possible remote code execution\n\n### Patches\nFixed in 6.0.6 and 5.2.27\n\n### Workarounds\nValidate and sanitise user input before using.\n\n### References\nhttps://nvd.nist.gov/vuln/detail/CVE-2018-19296\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open a private issue in [the PHPMailer project](https://github.com/PHPMailer/PHPMailer)","status":"published","published":"2020-03-05T22:08:55Z","modified":"2024-01-24T13:43:00Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-502","CWE-915","CWE-1321"],"updated_at":"2026-11-02T14:37:32.302254Z"}],"nvd":[{"id":"CVE-2018-19296","description":"PHPMailer before 5.2.27 and 6.x before 6.0.6 is vulnerable to an object injection attack.","status":"published","published":"2018-11-16T09:29:00.23Z","modified":"2026-06-17T01:49:05.447Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":6.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-502","CWE-1321"],"updated_at":"2026-11-02T14:04:48.987926Z"}],"osv":[{"id":"CVE-2018-19296","description":"PHPMailer before 5.2.27 and 6.x before 6.0.6 is vulnerable to an object injection attack.","status":"published","published":"2018-11-16T09:29:00.23Z","modified":"2026-10-24T10:49:38.622605137Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:44:08.834469Z"},{"id":"DEBIAN-CVE-2018-19296","description":"PHPMailer before 5.2.27 and 6.x before 6.0.6 is vulnerable to an object injection attack.","status":"published","published":"2018-11-16T09:29:00.23Z","modified":"2026-10-23T18:03:56.339820813Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:30.57382Z"},{"id":"GHSA-7w4p-72j7-v7c2","title":"Phar object injection in PHPMailer","description":"PHPMailer versions prior to 6.0.6 and 5.2.27 are vulnerable to an object injection attack by passing phar:// paths into `addAttachment()` and other functions that may receive unfiltered local paths, possibly leading to RCE. See [this article](https://knasmueller.net/5-answers-about-php-phar-exploitation) for more info on this type of vulnerability. Mitigated by blocking the use of paths containing URL-protocol style prefixes such as `phar://`. Reported by Sehun Oh of cyberone.kr.\n\n### Impact\nObject injection, possible remote code execution\n\n### Patches\nFixed in 6.0.6 and 5.2.27\n\n### Workarounds\nValidate and sanitise user input before using.\n\n### References\nhttps://nvd.nist.gov/vuln/detail/CVE-2018-19296\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open a private issue in [the PHPMailer project](https://github.com/PHPMailer/PHPMailer)","status":"published","published":"2020-03-05T22:08:55Z","modified":"2024-02-21T05:33:19.659123Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-1321","CWE-502","CWE-915"],"updated_at":"2026-11-02T15:46:41.349637Z"},{"id":"UBUNTU-CVE-2018-19296","description":"PHPMailer before 5.2.27 and 6.x before 6.0.6 is vulnerable to an object injection attack.","status":"published","published":"2018-11-16T09:29:00Z","modified":"2026-02-04T02:55:38.684265Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"},{"version":"3.0","score":8.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:54:17.496046Z"},{"id":"DLA-1591-1","title":"libphp-phpmailer - security update","status":"published","published":"2018-11-23T00:00:00Z","modified":"2026-03-09T01:00:55.641302Z","updated_at":"2026-11-02T15:46:09.777694Z"},{"id":"DSA-4351-1","title":"libphp-phpmailer - security update","status":"published","published":"2018-12-07T00:00:00Z","modified":"2026-03-09T02:10:25.045369Z","updated_at":"2026-11-02T15:46:16.862196Z"},{"id":"MGASA-2019-0010","title":"Updated php-phpmailer package fixes security vulnerability","description":"Potential object injection vulnerability (CVE-2018-19296).\n","status":"published","published":"2019-01-05T18:30:16Z","modified":"2026-04-16T06:25:59.14822778Z","updated_at":"2026-11-02T15:49:40.793816Z"},{"id":"USN-5956-1","title":"libphp-phpmailer vulnerabilities","description":"Dawid Golunski discovered that PHPMailer was not properly escaping user\ninput data used as arguments to functions executed by the system shell. An\nattacker could possibly use this issue to execute arbitrary code. This\nissue only affected Ubuntu 16.04 ESM. (CVE-2016-10033, CVE-2016-10045)\n\nIt was discovered that PHPMailer was not properly escaping characters\nin certain fields of the code_generator.php example code. An attacker\ncould possibly use this issue to conduct cross-site scripting (XSS)\nattacks. This issue was only fixed in Ubuntu 16.04 ESM and Ubuntu 18.04\nESM. (CVE-2017-11503)\n\nYongxiang Li discovered that PHPMailer was not properly converting\nrelative paths provided as user input when adding attachments to messages,\nwhich could lead to relative image URLs being treated as absolute local\nfile paths and added as attachments. An attacker could possibly use this\nissue to access unauthorized resources and expose sensitive information.\nThis issue only affected Ubuntu 16.04 ESM. (CVE-2017-5223)\n\nSehun Oh discovered that PHPMailer was not properly processing untrusted\nnon-local file attachments, which could lead to an object injection. An\nattacker could possibly use this issue to execute arbitrary code. This\nissue only affected Ubuntu 16.04 ESM. (CVE-2018-19296)\n\nElar Lang discovered that PHPMailer was not properly escaping file\nattachment names, which could lead to a misinterpretation of file types\nby entities processing the message. An attacker could possibly use this\nissue to bypass attachment filters. This issue was only fixed in Ubuntu\n16.04 ESM and Ubuntu 20.04 ESM. (CVE-2020-13625)\n\nIt was discovered that PHPMailer was not properly handling callables in\nits validateAddress function, which could result in untrusted code being\ncalled should the global namespace contain a function called 'php'. An\nattacker could possibly use this issue to execute arbitrary code. This\nissue was only fixed in Ubuntu 20.04 ESM and Ubuntu 22.04 ESM.\n(CVE-2021-3603)\n","status":"published","published":"2023-03-15T14:33:12Z","modified":"2026-06-25T13:31:53.33751944Z","updated_at":"2026-11-02T16:58:16.738762Z"}]}}
