Skip to content

fix: upgrade js-yaml to 4.3.1, 3.15.1 (GHSA-5p4m-2wfm-xmqj) - #471

Open
anupamme wants to merge 1 commit into
imzyb:mainfrom
anupamme:fix-repo-misub-ghsa-5p4m-2wfm-xmqj-js-yaml
Open

fix: upgrade js-yaml to 4.3.1, 3.15.1 (GHSA-5p4m-2wfm-xmqj)#471
anupamme wants to merge 1 commit into
imzyb:mainfrom
anupamme:fix-repo-misub-ghsa-5p4m-2wfm-xmqj-js-yaml

Conversation

@anupamme

Copy link
Copy Markdown

Summary

Upgrade js-yaml from 4.1.1 to 4.3.1, 3.15.1 to fix GHSA-5p4m-2wfm-xmqj.

Vulnerability

Field Value
ID GHSA-5p4m-2wfm-xmqj
Severity HIGH
Scanner trivy
Rule GHSA-5p4m-2wfm-xmqj
File package-lock.json (dependency: js-yaml)
Assessment Defensive hardening

Description: JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026-59870 fix not backported

Changes

  • package.json
  • package-lock.json

Behavior Preservation

The change is scoped to 2 files on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.


This patch removes an exploit primitive — a code pattern that, while not independently exploitable today, could be chained with other weaknesses by automated exploit-development tooling. Proactive removal of such primitives raises the bar against increasingly capable automated attack tools.


Automated security fix by OrbisAI Security

Automated dependency upgrade by OrbisAI Security
Ink-lotus added a commit to Ink-lotus/MiSub that referenced this pull request Sep 5, 2026
wrangler 4.93.1 捆的 workerd 构建于 2026-05-20,compat date 上限卡在
2026-05-27,而生产用的是 2026-07-20,本地没法跟生产同一口径。升级后
wrangler 内嵌 workerd 1.20260903.1,上限抬高,实测 2026-07-20 可正常启动。

三处对齐生产(生产配置由 `wrangler pages download config` 导出核对):
- compatibility_date 从 2024-04-01(那个废弃 toml 里的声明值)改为 2026-07-20
- 移除 compatibility_flags。生产未开 nodejs_compat,本地开着就比生产宽松,
  某类只在生产炸的问题本地测不出来;项目代码不 import 任何 node: 内建模块,
  去掉后 login / dns_templates / migrate_to_d1 三条路径实测正常
- 注释里把取值依据从「沿用旧 toml」改成「对齐面板导出」

顺带把 npm audit 的高危项从 10 降到 9(wrangler 依赖链上那条)。剩下的生产
依赖漏洞 js-yaml (high, 4.0.0-4.3.0) 与 dompurify (moderate) 不在本次范围内——
上游 PR imzyb#471 正在修 js-yaml,等整合上游时一并处理。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant