Skip to content

Navigation Menu

Sign in
Sign up

Fix CVE-2025-59717 allow-list type confusion - #152

Open
thesmartshadow wants to merge 1 commit into
digitalocean:master from
thesmartshadow:fix/cve-2025-59717-allowlist-type-confusion
Open

Fix CVE-2025-59717 allow-list type confusion #152
thesmartshadow wants to merge 1 commit into
digitalocean:master from
thesmartshadow:fix/cve-2025-59717-allowlist-type-confusion

Conversation

@thesmartshadow

@thesmartshadow thesmartshadow commented Jul 2, 2026
edited
Loading

Copy link
Copy Markdown

Summary

This fixes CVE-2025-59717 by normalizing the allowedClasses and allowedEnvironments options before performing allow-list membership checks.

Both options are intended to behave as allow-lists. However, .includes() has different behavior depending on the value type: arrays perform exact membership checks, while strings perform substring checks.

That means partial values such as in could match admin,info, and pro could match production,test, even though neither value was explicitly allowed.

Changes

  • Normalize string allowedClasses values into a single exact allowed value
  • Normalize string allowedEnvironments values into a single exact allowed value
  • Keep array-based allow-lists unchanged
  • Treat unsupported option types as unset
  • Add regression coverage to the existing callout and fence environment tests

Testing

Tested locally with:

npm run lint:js
npm test

@thesmartshadow thesmartshadow changed the title (削除) Normalize string allow-list options before membership checks (削除ここまで) (追記) Fix CVE-2025-59717 allow-list type confusion (追記ここまで) Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /