Description
Ghidra 11.0 before 12.1 contains a SQL injection vulnerability in the changePassword() method of PostgresFunctionDatabase that fails to escape double quotes in usernames interpolated into ALTER ROLE statements. Authenticated attackers can inject SQL commands via crafted username parameters in PasswordChange network messages to escalate to PostgreSQL superuser privileges and gain full database control.
Problem types
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Product status
11.0 (custom) before 12.1
12.1 (custom)
Credits
Sean Nejad (@allsmog)
References
github.com/...ghidra/security/advisories/GHSA-vv7r-2rhf-5h7g (GitHub Security Advisory (GHSA-vv7r-2rhf-5h7g))
www.vulncheck.com/...-password-change-via-unescaped-username