CVE-2023-28424
Soko es el código que impulsa packages.gentoo.org. Antes de la versión 1.0.2, los dos manejadores de búsqueda de paquetes, `Search` y `SearchFeed`, implementados en `pkg/app/handler/packages/search.go`, están afectados por una inyección SQL a través del parámetro `q`. Como resultado, atacantes no autenticados pueden ejecutar consultas SQL arbitrarias en `https://packages.gentoo.org/`. También se demostró que esa primitiva bastaba para conseguir ejecución de código en el contexto del contenedor de PostgreSQL. El problema se corrigió en el commit `4fa6e4b619c0362728955b6ec56eab0e0cbf1e23y` de la versión 1.0.2, utilizando sentencias preparadas (prepared statements) para interpolar datos controlados por el usuario en las consultas SQL.
Traducción automática del texto original de NVD (en inglés).
Cronología
Elaborada con nuestros propios datos: NVD, CISA KEV y otros catálogos de explotación, FIRST EPSS, exploits públicos, prensa especializada y la cobertura de Orbitaley.
- Registro CVE publicado en NVD
- Última modificación del registro en NVD
Tecnologías afectadas (1)
Registro NVD
- Estado en NVD
- Analizada
- Publicada
- 20 mar 2023
- Última modificación
- 17 jun 2026
- Vector CVSS
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Debilidad (CWE)
- CWE-89
Referencias
- Aviso del fabricantegithub.com/gentoo/soko/security/advisories/GHSA-gc2x-86p3-mxg2
- Parchegitweb.gentoo.org/sites/soko.git/commit
- Descripción técnicasonarsource.com/blog/why-orms-and-prepared-statements-cant-alwa…
JSON original (NVD)
Mostrar
{
"id": "CVE-2023-28424",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2023-28424",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "none"
},
{
"automatable": "yes"
},
{
"technicalImpact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2025-02-25T14:30:22.571444Z"
}
}
],
"cvssMetricV31": [
{
"type": "Secondary",
"source": "security-advisories@github.com",
"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:N/I:H/A:H",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "HIGH",
"privilegesRequired": "NONE",
"confidentialityImpact": "NONE"
},
"impactScore": 5.2,
"exploitabilityScore": 3.9
},
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 9.8,
"attackVector": "NETWORK",
"baseSeverity": "CRITICAL",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "HIGH",
"privilegesRequired": "NONE",
"confidentialityImpact": "HIGH"
},
"impactScore": 5.9,
"exploitabilityScore": 3.9
}
]
},
"affected": [
{
"source": "security-advisories@github.com",
"affectedData": [
{
"vendor": "gentoo",
"product": "soko",
"versions": [
{
"status": "affected",
"version": "< 1.0.2"
}
]
}
]
}
],
"published": "2023-03-20T13:15:11.973",
"references": [
{
"url": "https://github.com/gentoo/soko/security/advisories/GHSA-gc2x-86p3-mxg2",
"tags": [
"Vendor Advisory"
],
"source": "security-advisories@github.com"
},
{
"url": "https://gitweb.gentoo.org/sites/soko.git/commit/?id=4fa6e4b619c0362728955b6ec56eab0e0cbf1e23",
"tags": [
"Patch"
],
"source": "security-advisories@github.com"
},
{
"url": "https://www.sonarsource.com/blog/why-orms-and-prepared-statements-cant-always-win",
"tags": [
"Technical Description"
],
"source": "security-advisories@github.com"
},
{
"url": "https://github.com/gentoo/soko/security/advisories/GHSA-gc2x-86p3-mxg2",
"tags": [
"Vendor Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://gitweb.gentoo.org/sites/soko.git/commit/?id=4fa6e4b619c0362728955b6ec56eab0e0cbf1e23",
"tags": [
"Patch"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Analyzed",
"weaknesses": [
{
"type": "Secondary",
"source": "security-advisories@github.com",
"description": [
{
"lang": "en",
"value": "CWE-89"
}
]
},
{
"type": "Primary",
"source": "nvd@nist.gov",
"description": [
{
"lang": "en",
"value": "CWE-89"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "Soko if the code that powers packages.gentoo.org. Prior to version 1.0.2, the two package search handlers, `Search` and `SearchFeed`, implemented in `pkg/app/handler/packages/search.go`, are affected by a SQL injection via the `q` parameter. As a result, unauthenticated attackers can execute arbitrary SQL queries on `https://packages.gentoo.org/`. It was also demonstrated that primitive was enough to gain code execution in the context of the PostgreSQL container. The issue was addressed in commit `4fa6e4b619c0362728955b6ec56eab0e0cbf1e23y` of version 1.0.2 using prepared statements to interpolate user-controlled data in SQL queries."
}
],
"lastModified": "2026-06-17T05:47:41.300",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:gentoo:soko:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "3683F486-233D-4B6C-9737-FBA83943FFB4",
"versionEndExcluding": "1.0.2"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "security-advisories@github.com"
}