🔍 CVE-2025-61928

0.0
CVSS Score
UNKNOWN
2025-10-09
2026-10-19 16:10
✅ 완료

🇰🇷 한글 설명

Better Auth 1.3.26 미만 버전에서 발생하는 인증 우회 취약점입니다. 인증되지 않은 공격자가 요청 본문에 특정 사용자의 ID를 포함하여 API 키 생성 및 수정 경로에 요청을 보내면, 해당 사용자의 권한을 탈취할 수 있습니다. 이를 통해 공격자는 피해 사용자로 위장하여 애플리케이션 내의 모든 작업을 수행할 수 있습니다.

💡 쉬운 설명

로그인하지 않은 상태에서도 다른 사람의 아이디만 알면 그 사람의 비밀 열쇠(API 키)를 마음대로 만들 수 있는 보안 결함입니다. 이 열쇠를 얻은 공격자는 마치 해당 사용자인 것처럼 행동하며 개인 정보에 접근하거나 시스템을 조작할 수 있습니다.

🇺🇸 원문 (English)

Better Auth is an authentication and authorization library for TypeScript. In versions prior to 1.3.26, unauthenticated attackers can create or modify API keys for any user by passing that user's id in the request body to the `api/auth/api-key/create` route. `session?.user ?? (authRequired ? null : { id: ctx.body.userId })`. When no session exists but `userId` is present in the request body, `authRequired` becomes false and the user object is set to the attacker-controlled ID. Server-only field validation only executes when `authRequired` is true (lines 280-295), allowing attackers to set privileged fields. No additional authentication occurs before the database operation, so the malicious payload is accepted. The same pattern exists in the update endpoint. This is a critical authentication bypass enabling full an unauthenticated attacker can generate an API key for any user and immediately gain complete authenticated access. This allows the attacker to perform any action as the victim user using the api key, potentially compromise the user data and the application depending on the victim's privileges. Version 1.3.26 contains a patch for the issue.

📍 영향받는 시스템

Better Auth versions prior to 1.3.26

⚔️ 공격 벡터

인증되지 않은 상태에서 `api/auth/api-key/create` 또는 update 엔드포인트에 타겟 사용자의 `userId`를 포함한 요청 전송

🛡️ 대응 방법

Better Auth 라이브러리를 최신 버전인 1.3.26 이상으로 업데이트하십시오.

🔧 검증 코드

출력된 버전 번호가 1.3.26보다 낮으면 취약한 상태이며, 1.3.26 이상이면 안전합니다.

Shell / Script
npm list better-auth | grep -E 'better-auth@([0-9]+\.[0-9]+\.[0-9]+)'

💻 영향받는 소프트웨어

IBM WebSphere Application Server