개요
이 취약점이 무엇인지
When passing data to the b64decode(), standard_b64decode(), and urlsafe_b64decode() functions in the "base64" module the characters "+/" will always be accepted, regardless of the value of "altchars" parameter, typically used to establish an "alternative base64 alphabet" such as the URL safe alphabet. This behavior matches what is recommended in earlier base64 RFCs, but newer RFCs now recommend either dropping characters outside the specified base64 alphabet or raising an error. The old behavior has the possibility of causing data integrity issues.
This behavior can only be insecure if your application uses an alternate base64 alphabet (without "+/"). If your application does not use the "altchars" parameter or the urlsafe_b64decode() function, then your application does not use an alternative base64 alphabet.
The attached patches DOES NOT make the base64-decode behavior raise an error, as this would be a change in behavior and break existing programs. Instead, the patch deprecates the behavior which will be replaced with the newly recommended behavior in a future version of Python. Users are recommended to mitigate by verifying user-controlled inputs match the base64 alphabet they are expecting or verify that their application would not be affected if the b64decode() functions accepted "+" or "/" outside of altchars.
실제 악용 사례 · 아직 확인된 사례가 없어요
CISA의 KEV 카탈로그(실제 공격에 악용된 취약점 목록)에 아직 올라와 있지 않아요. 다만 ‘앞으로도 안전하다’는 뜻은 아니니 심각도와 EPSS를 함께 확인하세요.
패치 현황
어떤 버전이 위험하고, 몇 버전으로 올리면 되는지
| 제품 | 시작 | 끝 | 이 버전 이상으로 | |||
|---|---|---|---|---|---|---|
| pythonpython | 최초 버전 | ≤ | 취약 | < | 3.13.10 | 3.13.10이상 |
| 3.14.0 | ≤ | 취약 | < | 3.14.1 | 3.14.1이상 | |
| 이 버전만 | 취약 | = | 3.15.0 alpha1 | 벤더 공지 확인 | ||
NVD 분석 기준. 시작과 끝 사이 버전이 취약해요. ‘이 버전 이상으로’는 끝이 ‘<’로 적힌 경우에만 알 수 있어요.
할당 기관(CNA)이 적은 버전 3줄도 보기
| 제품 | 시작 | 끝 | 이 버전 이상으로 | |||
|---|---|---|---|---|---|---|
| CPythonPython Software Foundation | 최초 버전 | ≤ | 취약 | < | 3.13.10 | 3.13.10이상 |
| 3.14.0 | ≤ | 취약 | < | 3.14.1 | 3.14.1이상 | |
| 3.15.0a1 | ≤ | 취약 | < | 3.15.0a2 | 3.15.0a2이상 | |
참고 링크
NVD에 등록된 외부 자료예요. 익스플로잇·벤더 공지·패치 순으로 먼저 보여줘요.
패치6
- github.com/python/cpython/commit/13360efd385d1a7d0659beba03787ea3d063ef9b
- github.com/python/cpython/commit/1be80bec7960f5ccd059e75f3dfbd45fca302947
- github.com/python/cpython/commit/9060b4abbe475591b6230b23c2afefeff26fcca5
- github.com/python/cpython/commit/e95e783dff443b68e8179fdb57737025bf02ba76
- github.com/python/cpython/commit/fd17ee026fa9b67f6288cbafe374a3e479fe03a5