title: Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV
description: In PHP versions 7.2.x below 7.2.34, 7.3.x below 7.3.23 and 7.4.x below 7.4.11, when AES-CCM mode is used with openssl_encrypt() function with 12 bytes IV, only first 7 bytes of the IV is actually used. This can lead to both decreased security and incorrect encryption data.
problem types: CWE-20 Improper Input Validation
affected:
{
product: PHP
vendor: PHP Group
versions:
lessThan: 7.3.23, status: affected, version: 7.3.x, versionType: custom
lessThan: 7.4.11, status: affected, version: 7.4.x, versionType: custom
lessThan: 7.2.34, status: affected, version: 7.2.x, versionType: custom
}
metrics:
cvssV3_1: [
attackComplexity: LOW
attackVector: NETWORK
availabilityImpact: NONE
baseScore: 5.4
baseSeverity: MEDIUM
confidentialityImpact: LOW
integrityImpact: LOW
privilegesRequired: NONE
scope: UNCHANGED
userInteraction: REQUIRED
vectorString: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
version: 3.1
]