title: mail() may release string with refcount==1 twice
description: In PHP versions 7.3.x below 7.3.13 and 7.4.0 on Windows, when supplying custom headers to mail() function, due to mistake introduced in commit 78f4b4a2dcf92ddbccea1bb95f8390a18ac3342e, if the header is supplied in lowercase, this can result in double-freeing certain memory locations.
problem types: CWE-415 Double Free
affected:
{
platforms: Windows
product: PHP
vendor: PHP Group
versions:
lessThan: 7.3.13, status: affected, version: 7.3.x, versionType: custom
lessThan: 7.4.1, status: affected, version: 7.4.x, versionType: custom
}
metrics:
cvssV3_1: [
attackComplexity: HIGH
attackVector: NETWORK
availabilityImpact: HIGH
baseScore: 6.5
baseSeverity: MEDIUM
confidentialityImpact: NONE
integrityImpact: LOW
privilegesRequired: NONE
scope: UNCHANGED
userInteraction: NONE
vectorString: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H
version: 3.1
]