메뉴
HN
Hacker News • 54일 전

SQLite 심각한 취약점, 사실은 AI가 만든 가짜였다?

IMP
8/10
핵심 요약

최근 신규 생성된 깃허브 저장소에서 대량의 SQLite 치명적 취약점(CVE)이 보고되어 NVD와 CISA가 이를 심각도 9.8의 위험 등급으로 분류했습니다. 하지만 JFrog 보안 연구팀의 검증 결과, 제시된 코드는 존재하지 않고 증명 코드(PoC)도 작동하지 않는 등 AI가 생성한 가짜 허위 보고서(LLM 슬롭)임이 밝혀졌습니다. 이는 AI로 인해 만들어진 허위 보고서가 주요 취약점 데이터베이스를 오염시킬 수 있다는 심각성을 보여줍니다.

번역된 본문

SQLite 심각한 CVE인가, 아니면 LLM 슬롭(LLM 쓰레기 데이터)인가? Afek Berger, JFrog 보안 연구원 | 2026년 7월 30일

지난 며칠 동안, 새로 생성된 깃허브 저장소(programmervuln/cveadvisory-)가 다수의 SQLite 취약점 권고문을 게시했습니다 (우리가 판단하기에 하나를 제외한 나머지 50개 이상의 다른 CVE들도 LLM 슬롭인 것으로 보입니다). 미국 국가 취약점 데이터베이스(NVD)는 이를 즉시 치명적(Critical)으로 분류했고, CISA의 ADP(자동화된 취약점 데이터 제공자)도 이에 동의했습니다.

하지만 JFrog 보안 연구원들이 이를 검증하기 위해 파고들자, 주장들은 완전히 무너졌습니다.

  • 인용된 코드는 해당 버전에 존재하지 않았거나 전혀 관련 없는 로직을 참조하고 있었습니다.
  • 개념 증명(PoC) 페이로드를 테스트했을 때 전혀 작동하지 않았습니다(어떤 충돌도 유발하지 않음).
  • 이 CVE들은 실제 취약점을 추적하는 황금 표준인 SQLite 공식 권고 페이지에 전혀 등록되어 있지 않습니다.
  • 이 저장소의 모든 권고문을 Gptzero로 테스트해 보면 AI가 생성한 것으로 나타납니다.
  • 모든 권고문을 하나의 파일로 합치면 AI 생성 콘텐츠 경고가 발생합니다.

이를 통해 우리는 이 CVE들의 신뢰성에 의문을 품게 되었으며, 이 CVE들이 AI가 만들어낸 쓰레기 데이터(LLM slop)일 수 있음을 이해하게 되었습니다.

어제 이 중 하나인 CVE-2026-51302를 조사하는 동안, 우리는 레드햇(Red Hat)이 처음에 10.0의 치명적 심각도 점수를 할당한 것을 보았습니다. 오늘 다시 해당 CVE를 확인해 보니 점수가 7.6 높음(High)으로 강하 등급이 내려간 것을 확인했습니다.

분석 매트릭스

  • CVE-2026-51302: exprComputeOperands()의 UAF. 9.8 위험. 감사 결과: 존재하지 않는 함수 언급.
  • CVE-2026-51303: ExprListDelete() 역참조의 UAF. 9.8 위험. 감사 결과: 모순된 메타데이터. 존재하지 않는 패치가 있다고 권고문에 명시됨.
  • CVE-2026-51300: sqlite3ExprDelete()의 UAF. 9.1 위험. 감사 결과: 취약점과 무관한 코드 라인 인용.
  • CVE-2026-51297: jsonBlobEdit()를 통한 UAF. 8.8 높음. 감사 결과: 존재하지 않는 함수 언급.
  • CVE-2026-51296: jsonRemoveFunc의 UAF. 7.5 높음. 감사 결과: 존재하지 않는 라인 인용.
  • CVE-2026-51304: pOrderBy->nExpr 해제 후 사용(UAF). 7.5 높음. 감사 결과: 실제 함수에 잘못된 인수 개수를 표시함.

조사 방법론 이 보고서를 철저히 검증하기 위해 우리는 격리된 테스트 워크플로우를 구축했습니다.

  1. 소스 검사: 공식 sqlite/sqlite 저장소를 복제하고 대상 태그(version-3.41.0, version-3.51.2 등)를 체크아웃했습니다. 보고된 취약점 메커니즘을 실제 소스 코드와 비교했습니다.
  2. 클린 환경 빌드: 환경 오염을 방지하기 위해 격리된 Docker 컨테이너 내에서 공식 SQLite 릴리스를 직접 컴파일했습니다.
  3. PoC 실행: 메모리 버그를 감지하기 위해 AddressSanitizer(ASan) 계측 하의 컴파일된 SQLite 바이너리에 각 권고문의 PoC SQL 문을 그대로 입력했습니다.
  4. NVD 및 메타데이터 감사: 추적 정확성을 교차 확인하기 위해 NVD 및 GHSA 피드에서 CPE 패턴 및 권고 메타데이터를 평가했습니다.

상세 기술적 분석

  1. CVE-2026-51302: 존재하지 않는 논리 (9.8 위험)
  • 보고된 취약점: sqlite3ReleaseTempReg()가 regFree1에 댕글링 포인터를 남겨두어 나중에 exprComputeOperands()가 이를 역참조할 때 힙 해제 후 사용(UAF)이 발생한다고 주장합니다.
  • 조사 결과: 여기서 주요 문제는 exprComputeOperands() 함수가 SQLite 3.41에 존재하지 않는다는 것입니다. 이는 2025년 중반에 추가되었습니다. 게다가 sqlite3ReleaseTempReg()의 메커니즘은 힙 해제와 관련이 없습니다. 이 함수는 재사용을 위해 배열의 레지스터 인덱스를 단순히 재활용할 뿐이므로, 설계상 UAF가 발생하는 것이 불가능합니다.
  • PoC 테스트: 버그가 존재하지 않기 때문에 쿼리가 충돌을 유발하지 않고 성공적으로 실행되었습니다.
  1. CVE-2026-51303: 유령 패치 (9.8 위험)
  • 보고된 취약점: ExprListDelete()가 하위 노드를 해제할 때 상위 구조체의 백 참조를 지우지 못해 발생한다고 주장합니다.
원문 보기
원문 보기 (영어)
SQLite Critical CVEs or LLM Slop? Afek Berger, JFrog Security Researcher | 30 Jul, 2026 Over the past few days, a newly created GitHub repo ( programmervuln/cveadvisory- ) published a batch of SQLite vulnerability advisories (as part of other 50+ CVEs which we believe are also LLM slop except from one). NVD quickly flagged these as critical, and CISA's ADP agreed. But when JFrog security researchers dug in to verify, the claims fell apart: The cited code didn't even exist in those versions or referenced unrelated logic. When testing the PoC payloads they didn’t work (not triggering any crash). None of these CVEs are listed on SQLite’s official advisory page (which is a gold standard for tracking actual vulnerabilities). All advisories in this repo seem AI generated when testing them with Gptzero Combining all advisories into one file triggers AI-generated content warnings This made us question the reliability of these CVEs as well as understanding that these CVEs may be LLM slop. While investigating one of the CVEs yesterday, CVE-2026-51302, we saw that Red Hat initially assigned it a 10.0 Critical severity score: Looking at the CVE again today, we noticed that the score has since been downgraded to 7.6 High. Analysis Matrix CVE Reported Flaw CVSS NVD Metadata Audit Finding CVE-2026-51302 UAF in exprComputeOperands() 9.8 CRITICAL Pinned CPE: 3.41.0 The advisory mentions non-existing functions. CVE-2026-51303 UAF in ExprListDelete() back-refs 9.8 CRITICAL Contradictory metadata The advisory said there are non-existent fixes. CVE-2026-51300 UAF in sqlite3ExprDelete() 9.1 CRITICAL n/a placeholders Advisory cited lines that are unrelated to the vulnerability. CVE-2026-51297 UAF via jsonBlobEdit() 8.8 HIGH Pinned CPE: 3.41.0 The advisory mentions non-existing functions. CVE-2026-51296 UAF in jsonRemoveFunc 7.5 HIGH Populated CPE: 3.41.0 Advisory cited lines that do not exist. CVE-2026-51304 UAF via pOrderBy->nExpr post-free 7.5 HIGH Vendor/Product: n/a Advisory showed a real function with a wrong argument number. Investigation Methodology To verify these reports thoroughly, we established an isolated testing workflow: Source Inspection: We cloned the official sqlite/sqlite repository and checked out the target tags (version-3.41.0, version-3.51.2, and version-3.51.3). We compared the reported vulnerability mechanics against the actual source code. Clean Environment Build: Compiled the official SQLite releases directly inside isolated Docker containers to prevent environmental contamination. PoC Execution: Feed each advisory's PoC SQL statements verbatim into the compiled SQLite binaries under AddressSanitizer (ASan) instrumentation to detect memory bugs. NVD & Metadata Audit: Evaluated the CPE patterns and advisory metadata across NVD and GHSA feeds to cross-check tracking accuracy. Detailed Technical Breakdown 1. CVE-2026-51302: Non-Existent Logic (9.8 Critical) Reported Vulnerability: The advisory claims a heap use-after-free occurs when sqlite3ReleaseTempReg() leaves a dangling pointer in regFree1 , which is later dereferenced by exprComputeOperands() . Finding: The primary issue here is that exprComputeOperands() didn't exist in SQLite 3.41. It was added in the middle of 2025 (commits e24f20a , 280559b ). Furthermore, the mechanics of sqlite3ReleaseTempReg() do not involve heap deallocation. The function simply recycles register indices into an array for reuse, making a UAF impossible by design. /* expr.c:6562, SQLite 3.41.0 */ void sqlite3ReleaseTempReg(Parse *pParse, int iReg){ if( iReg ){ sqlite3VdbeReleaseRegisters(pParse, iReg, 1, 0, 0); if( pParse->nTempReg < ArraySize(pParse->aTempReg) ){ pParse->aTempReg[pParse->nTempReg++] = iReg; } } } PoC Testing: The query ran successfully without triggering a crash because the bug does not exist. 2. CVE-2026-51303: Ghost Fixes (9.8 Critical) Reported Vulnerability: Claims that ExprListDelete() fails to clear back-references in parent structures when releasing child nodes, allegedly patched in version 3.51.3. Finding: There is no evidence of back-reference pointers in the Expr , Select , or Window structures that could lead to such a state. Most tellingly, a diff between 3.51.2 and 3.51.3 shows absolutely no changes to src/expr.c . The "patch" was entirely fabricated. PoC Testing: The PoC is invalid SQL and fails at the parser stage, never actually hitting the execution logic. 3. CVE-2026-51300: Misdirected Call Sites (9.1 Critical) Reported Vulnerability: Claims a UAF occurs in sqlite3ExprDelete() because a left-hand expression pointer is not cleared, referencing specific line numbers in expr.c . Finding: The cited line numbers ( 1012 and 1026 ) are a comment and a memory allocation call respectively, neither has anything to do with pLeft or deletion logic. While the function is called during OOM error handling, it occurs at the end of a scope where the pointer is never reused, preventing any potential UAF. /* expr.c:1330, SQLite 3.41.0 */ void sqlite3ExprDelete(sqlite3 *db, Expr *p){ if( p ) sqlite3ExprDeleteNN(db, p); } PoC Testing: Executed successfully as a valid SQL query, returning expected output with zero memory leaks or errors. 4. CVE-2026-51297 (8.8 High) Reported Vulnerability: Claims jsonParseFree() leaves dangling references that are later accessed by jsonBlobEdit() . Finding: Similar to the first case, jsonBlobEdit() was not present in the reported target version (3.41.0). It was only introduced later as part of the JSONB implementation. In the target version, jsonParseFree() is used strictly in destructors where the surrounding structure is immediately discarded. PoC Testing: The PoC hits a malformed JSON error immediately, meaning the code never reaches the JSON modification logic where the vulnerability supposedly exists. 5. CVE-2026-51296: Impossible Line Numbers (7.5 High) Reported Vulnerability: Reports a UAF in jsonRemoveFunc specifically at lines 3555 and 3575 of json.c . Finding: In version 3.41.0, src/json.c is only 2706 lines long. The cited line numbers don't exist. The actual implementation of the function was found roughly 2000 lines earlier, and an audit of that code showed no memory management flaws. PoC Testing: The payload fails during JSON parsing, leaving the memory untouched. 6. CVE-2026-51304 CVSS 7.5 (HIGH) Reported Vulnerability: Claims sqlite3ExprListDelete(pOrderBy) frees the ordering list while subsequent code reads pOrderBy->nExpr . Finding: The single-argument signature reported in the advisory does not exist. the actual signature requires a pointer to the database context ( sqlite3 *db ). Furthermore, SQLite explicitly nulls pointers immediately after deletion: /* select.c:3761, SQLite 3.41.0 */ sqlite3ExprListDelete(db, pPrior->pOrderBy); pPrior->pOrderBy = 0; /* Pointer immediately cleared; impossible to dereference */ PoC Testing: The PoC payload executed against a 20-column ORDER BY query processed normally, returning sorted results with no issues. How Can AI Slop CVEs Happen The CVE submission process via MITRE's public form lacks any real identity verification, meaning virtually anyone can submit a vulnerability description and propose a CVSS score. Historically, NIST acted as a reliable safety net for this system, experts at the National Vulnerability Database (NVD) manually analyzed, validated, and enriched incoming CVEs before giving them a stamp of approval. But that safety net broke in February 2024 . Hit by a massive surge in vulnerability reports, NIST effectively hit pause on deep analysis. CISA and other Authorized Data Publishers (ADPs) tried to step in with their own enrichment efforts, but the global pipeline is now fragmented and drowning in a massive backlog. Because no step in today's system actually requires a proof-of-concept or bug reproduction, a plausible-sounding fake advisory can slide right through the pipeline and end up in GHSA, downstream databases, and enterprise scanners. Key Takeaways This incident demonstrates a sy