Advisory

GHSA-7w4p-72j7-v7c2

Also known as: CVE-2018-19296

Summary

Phar object injection in PHPMailer

Details

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 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.

Impact
Object injection, possible remote code execution

Patches
Fixed in 6.0.6 and 5.2.27

Workarounds
Validate and sanitise user input before using.

References
https://nvd.nist.gov/vuln/detail/CVE-2018-19296

For more information
If you have any questions or comments about this advisory:

Severity

High Basis: The source's own band: HIGH

Dates

Published
2020-03-05 22:08 UTC
Modified
2024-02-21 05:33 UTC

Affected packages and fixes

phpmailer/phpmailer

Packagist · All systems

Affected

  • introduced 5.0.0, fixed 5.2.27 (ecosystem)

Fixed versions

5.2.27

Fix

The export has no generic command for this ecosystem.

phpmailer/phpmailer

Packagist · All systems

Affected

  • introduced 6.0.0, fixed 6.0.6 (ecosystem)

Fixed versions

6.0.6

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences