Skip to content

Update xmlseclibs requirement to ^4.0 due GHSA-m5mw-mr39-66vp - #655

Open
scybulski wants to merge 2 commits into
SAML-Toolkits:4.x-devfrom
scybulski:4.x-dev
Open

Update xmlseclibs requirement to ^4.0 due GHSA-m5mw-mr39-66vp#655
scybulski wants to merge 2 commits into
SAML-Toolkits:4.x-devfrom
scybulski:4.x-dev

Conversation

@scybulski

@scybulski scybulski commented Sep 9, 2026

Copy link
Copy Markdown

Description

Summary

#654

Upgrades robrichards/xmlseclibs from ^3.1.5 to ^4.0 to address a critical signature-forgery vulnerability. Adds a new security.allowRSA15KeyTransport setting (default false) so deployments with legacy IdPs that still use RSA-1.5 key transport can opt in during migration, while secure defaults remain unchanged.

Security

This addresses:

xmlseclibs 4 also denies RSA-1.5 key transport by default (Bleichenbacher risk). This PR maps that behavior to an explicit toolkit setting rather than silently breaking encrypted assertions/NameIDs for legacy peers.

Changes

  • Bump robrichards/xmlseclibs to ^4.0
  • Bump minimum PHP to >=8.0 (required by xmlseclibs 4)
  • Add security.allowRSA15KeyTransport (default false); documented in advanced_settings_example.php
  • Wire the setting through decryption paths:
    • Utils::decryptElement() / Utils::createDecryptionContext()
    • Response (encrypted assertions and encrypted NameIDs)
    • LogoutRequest::getNameIdData(), getNameId(), and isValid()
  • Update CHANGELOG under [UNRELEASED]
  • Update tests for xmlseclibs 4 error-message changes; add OAEP and RSA-1.5 fixtures covering default, opt-in, and blocked behavior

Breaking changes

  • PHP >=8.0 required (was >=7.3)
  • RSA-1.5 encrypted assertions/NameIDs fail by default unless security.allowRSA15KeyTransport => true is set for a given IdP/integration

Migration notes

For most deployments, no config change is needed.

If decryption fails with "RSA-1.5 key transport is disabled":

  1. Prefer reconfiguring the IdP to use RSA-OAEP where possible.
  2. Only if that is not feasible, enable per-integration:
'security' => [
    'allowRSA15KeyTransport' => true,
],

This mirrors xmlseclibs 4 guidance: use algorithm allowlists / secure defaults, and enable legacy RSA-1.5 only temporarily while migrating peers.

Test plan

  • ./vendor/bin/phpunit — 300 tests, 1330 assertions
  • OAEP encrypted NameID fixtures decrypt with default settings
  • RSA-1.5 fixtures decrypt only with allowRSA15KeyTransport => true
  • RSA-1.5 fixtures rejected when the setting is false

References

  • xmlseclibs 4.0 advisory: GHSA-m5mw-mr39-66vp
  • Prior advisory-driven bumps in this repo: v4.3.2 (xmlseclibs 3.1.5), v4.3.1 (xmlseclibs 3.1.4)

scybulski and others added 2 commits September 9, 2026 16:55
Addresses AIKIDO-2026-134354; require PHP >=8.0. Legacy IdPs can enable
security.allowRSA15KeyTransport for RSA-1.5 encrypted assertions/NameIDs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@pitbulk

pitbulk commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Thanks @scybulski for the collaboration, I will review carefully and merge asap.

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.

2 participants