Skip to content

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

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

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

Conversation

@thesmartshadow

@thesmartshadow thesmartshadow commented Jul 2, 2026

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant