Workspace IndexKnowledge Notes › SQL injection — the oldest bug that still tops the charts

#236PoC

SQL injection — the oldest bug that still tops the charts

SQL injection concatenates untrusted input into a query so the input becomes code, a decades-old class that parameterized queries fully solve yet still appears in new breaches.

Not yet scoped.

Why

The PoC demonstrates injection against a toy endpoint and the parameterized fix, then generalizes to the rule: never build a command by string-joining untrusted data.

How it works

Not yet built.

Where it lands in Jayverse

  • gitboard: audit every dashboard query for string-concatenated input. Any query built from user or service input must use parameterized queries, never string-joined data.
  • Number: apply the same parameterized-query rule to its data access layer. Even though Number is admin-only, add it as a standing test for research and reading lookups.
  • Auditor: generalize "never build a command by string-joining untrusted data" beyond SQL. Apply it to any off-chain service constructing shell commands, RPC calls or queries from external input.

Key expressions

Words and phrases from this page worth keeping, with the Korean meaning and the sentence they come from.

Expression뜻 · 쓰이는 자리
top the charts순위 최상위를 차지하다 · 오래된 취약점이 여전히 1위일 때. "a decades-old class... still tops the charts"
untrusted input신뢰할 수 없는 입력값 · 검증되지 않은 외부 데이터를 가리킬 때. "concatenates untrusted input into a query"
string-join문자열을 그대로 이어붙이다 · 위험한 쿼리 작성 방식을 지적할 때. "never build a command by string-joining untrusted data"
generalize to~로 일반화하다 · 구체적 사례에서 일반 원칙을 끌어낼 때. "then generalizes to the rule"
toy endpoint연습용(단순화된) 엔드포인트 · 실습을 위해 만든 가벼운 예제를 말할 때. "injection against a toy endpoint"

← All Knowledge Notes · Workspace Index · Top ↑

SQL 인젝션 — 여전히 차트 1위인 가장 오래된 버그

SQL 인젝션은 신뢰할 수 없는 입력을 쿼리에 이어 붙여 입력을 코드로 만드는 수십 년 된 계급이며, 파라미터화 쿼리가 완전히 해결하는데도 새 침해에 계속 등장합니다.

아직 범위 미정.

이 PoC는 장난감 엔드포인트에 대한 인젝션과 파라미터화 수정을 시연한 뒤, 규칙으로 일반화합니다: 신뢰할 수 없는 데이터를 문자열로 이어 붙여 명령을 만들지 말라.

동작 방식

아직 만들지 않음.

Jayverse에서의 위치

  • gitboard: 문자열 연결로 만든 쿼리를 모든 대시보드에서 감사한다. 사용자나 서비스 입력으로 만들어지는 모든 쿼리는 문자열 결합이 아니라 파라미터화된 쿼리를 써야 한다.
  • Number: 데이터 접근 계층에도 같은 파라미터화 쿼리 규칙을 적용한다. Number가 관리자 전용이더라도, 연구·읽기 조회에 상시 테스트로 추가한다.
  • Auditor: "신뢰할 수 없는 데이터를 문자열로 이어붙여 명령을 만들지 않는다"를 SQL 너머로 일반화한다. 셸 명령, RPC 호출, 쿼리를 외부 입력으로 구성하는 모든 오프체인 서비스에 적용한다.

핵심 표현

이 페이지의 영어 본문에서 배울 만한 단어와 표현, 뜻과 나온 자리.

Expression뜻 · 쓰이는 자리
top the charts순위 최상위를 차지하다 · 오래된 취약점이 여전히 1위일 때. "a decades-old class... still tops the charts"
untrusted input신뢰할 수 없는 입력값 · 검증되지 않은 외부 데이터를 가리킬 때. "concatenates untrusted input into a query"
string-join문자열을 그대로 이어붙이다 · 위험한 쿼리 작성 방식을 지적할 때. "never build a command by string-joining untrusted data"
generalize to~로 일반화하다 · 구체적 사례에서 일반 원칙을 끌어낼 때. "then generalizes to the rule"
toy endpoint연습용(단순화된) 엔드포인트 · 실습을 위해 만든 가벼운 예제를 말할 때. "injection against a toy endpoint"

← 전체 기술 노트 · 워크스페이스 인덱스 · 맨 위 ↑