# CVE-2023-28424: Soko SQL Injection vulnerability

- Severity: Critical 9.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.15%, higher than 67% of CVEs (2026-12-01)
- Published: 2023-03-20T12:47:13.250Z
- Modified: 2026-06-17T05:47:41.300Z
- Weaknesses: CWE-89
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- gentoo soko: < 1.0.2; before 1.0.2

## Every score

- GitHub_M: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/gentoo/soko/security/advisories/GHSA-gc2x-86p3-mxg2> (vendor-advisory)
- <https://gitweb.gentoo.org/sites/soko.git/commit/?id=4fa6e4b619c0362728955b6ec56eab0e0cbf1e23> (patch)
- <https://www.sonarsource.com/blog/why-orms-and-prepared-statements-cant-always-win> (technical-description)

## Sources

- CVE List: [CVE-2023-28424](https://www.cve.org/CVERecord?id=CVE-2023-28424), CVE Terms of Use, modified 2025-02-25
- NVD: [CVE-2023-28424](https://nvd.nist.gov/vuln/detail/CVE-2023-28424), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-28424 · Whole record: https://cve.day/CVE-2023-28424.json · Rebuilt by cve.day 2026-11-25T22:58:22.534Z
