🔍 CVE-2026-48031

9.1
CVSS Score
CRITICAL
2026-08-03
2026-10-23 21:10
✅ 완료

🇰🇷 한글 설명

go-base Go RESTful API 템플릿의 2026-05-18 이전 버전에서 JWT 서명 비밀키가 'random'이라는 알려진 문자열로 하드코딩되어 있습니다. 이로 인해 공격자가 임의의 사용자 및 관리자 권한을 가진 토큰을 위조하여 모든 보호된 엔드포인트의 인증을 완전히 우회할 수 있습니다.

💡 쉬운 설명

로그인 확인을 위한 비밀번호가 너무 쉬운 단어로 고정되어 있어, 해커가 가짜 신분증을 마음대로 만들어 관리자 권한을 훔칠 수 있는 문제입니다. 이로 인해 시스템의 모든 보안 기능이 무력화될 수 있습니다.

🇺🇸 원문 (English)

go-base is a Go RESTful API Boilerplate template with JWT Authentication, backed by PostgreSQL. In versions prior to 2026-05-18, the JWT signing secret is hardcoded to the known string "random", letting any attacker who reads the public repository forge tokens for arbitrary users, including admin roles, and completely bypass authentication on all protected endpoints. This value is set in two places: the dev.env template (line 10) and a programmatic fallback in cmd/serve.go (line 35), so the application uses it even when no .env file is present. The original mitigation in auth/jwt/tokenauth.go (lines 22 to 25) only caught the exact string "random", letting other weak secrets through, and replaced it with an in-memory key that was not persisted, invalidating all tokens on every restart and effectively causing a denial-of-service. This issue has been fixed in version 2026-05-18.

📍 영향받는 시스템

go-base (2026-05-18 미만 버전)

⚔️ 공격 벡터

하드코딩된 JWT 비밀키('random')를 사용하여 관리자 권한을 가진 위조된 JWT 토큰 생성 및 인증 우회

🛡️ 대응 방법

go-base를 2026-05-18 버전 이상으로 업데이트하고, 환경 변수를 통해 강력한 고유 비밀키를 설정하십시오.

🔧 검증 코드

명령어 결과에서 'random'이라는 문자열이 소스 코드나 설정 파일에서 발견되면 취약한 상태입니다.

Shell / Script
grep -r "JWT_SECRET=random" . && grep -n "random" cmd/serve.go

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

💻 영향받는 소프트웨어

PostgreSQL