How to fix the vulnerability in Wordpress class-phpmailer.php — RCE: CVE-2016-10045, CVE-2016-10031?

Good day, tell me how to fix CVE-2016-10045, CVE-2016-10031
Information about this is not found, discovered they were not so long ago.

The script is located in wordpress here:
/wp-includes/class-phpmailer.php - RCE : CVE-2016-10045, CVE-2016-10031

phpmailer version 5.2.22
Visited version v6.0.0rc4 (the result is the same) from here -
August 19th 19 at 23:34
1 answer
August 19th 19 at 23:36
The vulnerabilities affect versions of PHPMailer below 5.2.18 and 5.2.20, the latest version of WP uses 5.2.22, which eliminated not only the vulnerabilities, but also another, discovered in version 5.2.21. See changelog.

What to do? As usual - to update WordPress and sleep.

Find more questions by tags PHPMailerWordPress