🇰🇷 한글 설명
Tina CMS 3.0.0 미만 버전에서 @tinacms/cli가 Git 브랜치 이름을 API URL에 포함할 때 발생하는 코드 주입 취약점입니다. 공격자가 따옴표가 포함된 특수 브랜치 이름을 생성하면, 빌드 과정 중 JavaScript 문자열을 조작하여 임의의 코드를 실행할 수 있습니다. 이로 인해 환경 변수 탈취나 배포 아티팩트 변조와 같은 심각한 보안 위협이 발생할 수 있습니다.
💡 쉬운 설명
나쁜 의도를 가진 사람이 특수한 이름의 브랜치를 만들면, 웹사이트를 만드는 과정에서 해커의 명령어가 몰래 실행될 수 있는 문제입니다. 이를 통해 중요한 비밀번호를 훔치거나 웹사이트 내용을 마음대로 바꿀 수 있습니다.
🇺🇸 원문 (English)
Tina is a headless content management system. Prior to 3.0.0, @tinacms/cli reads Git branch values from VERCEL_GIT_COMMIT_REF, GITHUB_BRANCH, or HEAD, incorporates the raw value into the API URL, and interpolates that URL into JavaScript string literals in packages/@tinacms/cli/src/next/codegen/index.ts and packages/@tinacms/cli/src/next/codegen/codegen/plugin.ts. A crafted Git-valid branch name containing a quote can terminate the generated string and inject an expression that executes when the generated client module is imported during a preview build. The injected code runs with the build process privileges and can read environment credentials, modify deployment artifacts, or make network requests. This issue is fixed in version 3.0.0.
📍 영향받는 시스템
Tina CMS @tinacms/cli version < 3.0.0
⚔️ 공격 벡터
따옴표(' 또는 ")가 포함된 Git 브랜치 이름을 생성하여 빌드 시 JavaScript 코드 주입
🛡️ 대응 방법
Tina CMS를 3.0.0 이상의 최신 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 정보가 3.0.0 미만인지 확인하여 취약 여부를 판단합니다.