Kestrel
대시보드로 돌아가기
CVE-2026-62388HIGHMITRENVDGHSA대응게시일: 2026. 08. 22.수정일: 2026. 09. 02.

NLTK: Default ENFORCE=False Disables All pathsec Security Controls

위협 신호 · CVSS · EPSS · KEV

정기 패치· 높은 악용 신호 없음
CVSS
high

이론적 심각도 점수

EPSS
0.5%상위 61.6%

30일 내 악용 확률 예측

KEV
미등재

실측 악용 기록 없음

권장 대응 기한60일 이내CISA SSVC 기준

계획된 패치 주기 내 조치(60일 이내)

외부 노출· KEV 미등재 · 자동화 어려움 · 부분 영향 · 외부 노출

CVSS 벡터 · 메트릭

CVSS 벡터 정보 없음

상세 설명

NLTK's pathsec.py security module defaults to ENFORCE=False (line 24), which means all 8 security validation functions only emit RuntimeWarning instead of raising exceptions when violations are detected.

The pathsec module was introduced as the fix for CVE-2024-39705 (arbitrary code execution via pickle) and CVE-2026-0846 (path traversal). However, with ENFORCE=False as the default:

  1. pathsec.open('/etc/passwd') succeeds (reads the file, emits warning)
  2. pathsec.validate_network_url('http://169.254.169.254/...') succeeds (warning only)
  3. pickle.loads() via nltk.data.load() proceeds despite unsafe source (warning only)

Every security gate follows the same pattern:

python
1ENFORCE = os.environ.get('NLTK_PATHSEC_ENFORCE', '').lower() in ('1', 'true', 'yes')
2
3def validate_something(path):
4 if is_violation(path):
5 if ENFORCE:
6 raise SecurityError('...') # Only raised when env var is set
7 else:
8 warnings.warn('...', RuntimeWarning) # Default: warning only
9 # Execution continues regardless

This means the security remediations for CVE-2024-39705 and CVE-2026-0846 are effectively disabled by default. Any user who installed NLTK 3.9.x expecting the security fixes to be active is still vulnerable unless they manually set NLTK_PATHSEC_ENFORCE=1.

PoC:

python
1import nltk.pathsec
2import warnings
3
4# Show that ENFORCE is False by default
5print(f'ENFORCE = {nltk.pathsec.ENFORCE}') # False
6
7# Attempt to read /etc/passwd through pathsec -- should be blocked
8with warnings.catch_warnings(record=True) as w:
9 warnings.simplefilter('always')
10 result = nltk.pathsec.open('/etc/passwd', 'r')
11 print(f'File opened: {result.name}') # /etc/passwd
12 print(f'Warning emitted: {w[0].message}') # RuntimeWarning (not an exception)
13 # Attack succeeds -- file is readable

The correct default is fail-secure: ENFORCE should be True unless explicitly disabled. The current default makes the security module opt-in rather than opt-out, defeating its purpose.

Suggested fix: Change default to ENFORCE=True. Users who need backwards compatibility can set NLTK_PATHSEC_ENFORCE=0 to explicitly disable.

AI 심층 분석

공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.