CVE-2022-31631
In PHP versions 8.0.* before 8.0.27, 8.1.* before 8.1.15, 8.2.* before 8.2.2 when using PDO::quote() function to quote user-supplied data for SQLite, supplying an overly long string may cause the driver to incorrectly quote the data, which may further lead to SQL injection vulnerabilities.
CVSS
- Versión: 3.1
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- Puntuación base: 9.1
Probabilidad de explotación (EPSS)
- Probabilidad de explotación en los próximos 30 días: 2.17%
- Percentil entre todas las CVEs puntuadas: 82
- Fecha de la puntuación: 6/10/2026
EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).
🎯 Técnicas ATT&CK
Cómo se explota esta vulnerabilidad y qué consigue el atacante, en el lenguaje de MITRE ATT&CK.
- Explotación
T1190Exploit Public-Facing Applicationinitial access92 % - Impacto principal
T1005Data from Local Systemcollection85 % - Impacto secundario
T1565.002Transmitted Data Manipulationimpact80 %
Vulnerabilidad remota sin autenticación (AV:N/PR:N/UI:N) en PDO::quote() de PHP permite SQLi (CWE-74) contra bases SQLite expuestas, conseguindo lectura e inyección de datos.
Inferido por nuestro agente de análisis a partir de la descripción oficial, el vector CVSS y la CWE, y comprobado por un supervisor. Puede contener errores.
🛡️ Mitigaciones ATT&CK que cubren estas técnicas
Tecnologías afectadas (1)
CWE
- CWE-74
Referencias
JSON original (NVD)
Mostrar
{
"id": "CVE-2022-31631",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2022-31631",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "yes"
},
{
"technicalImpact": "total"
}
],
"version": "2.0.3",
"timestamp": "2025-02-13T16:06:19.759677Z"
}
}
],
"cvssMetricV31": [
{
"type": "Secondary",
"source": "security@php.net",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 9.1,
"attackVector": "NETWORK",
"baseSeverity": "CRITICAL",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "HIGH"
},
"impactScore": 5.2,
"exploitabilityScore": 3.9
}
]
},
"affected": [
{
"source": "security@php.net",
"affectedData": [
{
"vendor": "PHP Group",
"product": "PHP",
"versions": [
{
"status": "affected",
"version": "8.0.x",
"lessThan": "8.0.27",
"versionType": "semver"
},
{
"status": "affected",
"version": "8.1.x",
"lessThan": "8.1.15",
"versionType": "semver"
},
{
"status": "affected",
"version": "8.2.x",
"lessThan": "8.2.2",
"versionType": "semver"
}
],
"packageName": "pdo_sqlite",
"defaultStatus": "affected"
}
]
}
],
"published": "2025-02-12T22:15:29.007",
"references": [
{
"url": "https://bugs.php.net/bug.php?id=81740",
"tags": [
"Vendor Advisory"
],
"source": "security@php.net"
},
{
"url": "https://security.netapp.com/advisory/ntap-20230223-0007/",
"tags": [
"Third Party Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://bugs.php.net/bug.php?id=81740",
"tags": [
"Vendor Advisory"
],
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"
}
],
"vulnStatus": "Analyzed",
"weaknesses": [
{
"type": "Secondary",
"source": "security@php.net",
"description": [
{
"lang": "en",
"value": "CWE-74"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "In PHP versions 8.0.* before 8.0.27, 8.1.* before 8.1.15, 8.2.* before 8.2.2 when using PDO::quote() function to quote user-supplied data for SQLite, supplying an overly long string may cause the driver to incorrectly quote the data, which may further lead to SQL injection vulnerabilities."
},
{
"lang": "es",
"value": "En las versiones de PHP 8.0.* anteriores a 8.0.27, 8.1.* anteriores a 8.1.15, 8.2.* anteriores a 8.2.2, cuando se usa la función PDO::quote() para citar datos proporcionados por el usuario para SQLite, proporcionar una cadena demasiado larga puede provocar que el controlador cite incorrectamente los datos, lo que puede generar vulnerabilidades de inyección SQL."
}
],
"lastModified": "2026-06-17T04:45:50.960",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "B25DE957-1D86-408D-AD1E-DBFB14115959",
"versionEndExcluding": "8.0.27",
"versionStartIncluding": "8.0.0"
},
{
"criteria": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "AF93F09C-C6A3-49AF-9202-0EC78065547D",
"versionEndExcluding": "8.1.15",
"versionStartIncluding": "8.1.0"
},
{
"criteria": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "E87D2720-F21F-4FDE-A262-B8BA0B62AD98",
"versionEndExcluding": "8.2.2",
"versionStartIncluding": "8.2.0"
}
],
"operator": "OR"
},
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:sqlite:sqlite:*:*:*:*:*:*:*:*",
"vulnerable": false,
"matchCriteriaId": "46D17F35-DB4A-491C-BB28-4BFA36F3618F",
"versionStartIncluding": "3.39.2"
}
],
"operator": "OR"
}
],
"operator": "AND"
}
],
"sourceIdentifier": "security@php.net"
}