🇰🇷 한글 설명
Budibase 3.45.0 미만 버전에서 MySQL 및 MSSQL 컬럼 이름 변경 시 식별자를 직접 보간하여 발생하는 SQL 인젝션 취약점입니다. 공격자가 특수 문자가 포함된 컬럼 이름을 생성하면, Budibase가 이를 처리하는 과정에서 삽입된 SQL 명령어가 실행될 수 있습니다. 특히 MySQL의 경우 다중 문 실행 설정이 활성화되어 있어 데이터베이스에 대한 임의의 읽기, 쓰기 및 파괴적 작업이 가능합니다.
💡 쉬운 설명
데이터베이스의 이름을 바꾸는 과정에서 나쁜 명령어를 몰래 끼워 넣어 실행할 수 있는 보안 약점입니다. 이를 통해 해커가 데이터베이스에 저장된 중요한 정보를 훔치거나 데이터를 모두 삭제할 수 있습니다.
🇺🇸 원문 (English)
Budibase (@budibase/server) before 3.45.0 builds MySQL and MSSQL column-rename DDL in packages/backend-core/src/sql/sqlTable.ts by interpolating identifiers directly into a raw query string (backtick-quoted for MySQL, a single-quoted sp_rename literal for MSSQL) without applying the project's quoteMySqlIdentifier / quoteSqlServerIdentifier helpers. An attacker with DDL rights on a connected MySQL/MSSQL datasource can create a column whose name contains a backtick (MySQL) or single quote (MSSQL) plus additional SQL; Budibase's schema introspection stores the name verbatim, and when a Budibase builder later renames that column through the UI (POST /api/tables with _rename.old), the embedded quote character terminates the identifier and the injected SQL is executed. Because the MySQL connection is opened with multipleStatements: true, stacked statements run as Budibase's datasource user, allowing arbitrary reads, writes, or destructive operations on the connected database outside Budibase's row/table permission model. Fixed in 3.45.0.
📍 영향받는 시스템
Budibase (@budibase/server) 3.45.0 미만 버전
⚔️ 공격 벡터
DDL 권한을 가진 공격자가 특수 문자가 포함된 컬럼 이름을 생성한 후, Budibase UI를 통해 컬럼 이름을 변경하여 SQL 인젝션 공격 수행
🛡️ 대응 방법
Budibase를 최신 버전인 3.45.0 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 3.45.0 미만이라면 해당 취약점에 노출된 상태입니다.
npm list @budibase/server | grep -E '@budibase/server@([0-3]\.[0-4][0-4]\.[0-9]+|[4-9]\.[0-9]\.[0-9]+)'