flawopen.com/보안 사고/PostgreSQL CVE-2025-1094

CVE-2025-1094: 주입 공격을 막으려던 이스케이프 함수가 직접 명령 실행 통로를 열어준 사건

High Severity CWE-89: SQL Injection Disclosed February 2025
쉬운 설명 (ELI5)

모든 말을 따옴표로 감싸 시스템 명령어로 오인되지 않게 만드는 번역관이 있습니다. 그에게 미등록된 낯선 문자를 말하자 혼란에 빠져 닫는 따옴표를 빠뜨렸습니다. 따옴표를 벗어난 문장은 즉시 컴퓨터의 최고 권한 실행 명령어로 처리되었습니다.

The lessons that actually transfer

FAQ

Does this mean escaping functions can't be trusted?

It means they are ordinary software with ordinary bugs, and that relying on them puts a correctness burden in a place where a single mistake is exploitable. Parameterised queries avoid the burden entirely, which is why they remain the primary recommendation.

Was my application vulnerable if I use an ORM?

Most ORMs and modern drivers use the extended query protocol with bound parameters rather than libpq's escaping helpers, which sidesteps the flaw. The exposure was concentrated in code that explicitly called the escape functions or shelled out to psql. Patching the client library is still the correct action.

Which versions fixed it?

PostgreSQL 17.3, 16.7, 15.11, 14.16 and 13.19, released on 13 February 2025.

Related reading

출처 및 공식 보안 권고