unstale

npm / samlify

samlify

What changed in samlify 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

24 breaking11 security13 new APIs and options5 behavior and defaults9 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

samlify 262 changes

Breaking changes 24

  • RSA-1.5 and TripleDES decryption are refused unless allowInsecureDecryptionAlgorithms is true.

    2.15.0release notes

  • Responses are checked against the SP's audience, destination, and recipient; audience checking can be disabled with wantAudienceCheck: false.

    2.15.0release notes

  • Text containing comments or CDATA is read whole, preventing extracted values from differing from the signed text.

    2.15.0release notes

  • Response and signed SubjectConfirmationData InResponseTo values must agree; supplying undefined or null rejects a response that answers a request.

    2.15.0release notes

  • Passing undefined or null when no request is pending rejects a response that answers a request; omit the option to avoid this check.

    2.15.0release notes

  • Logout requests must come from the expected issuer, target a receiver SingleLogoutService location, be unexpired, and are accepted only once when replayCache is configured.

    2.15.0release notes

  • A message is rejected if its root element does not match the parser.

    2.15.0release notes

  • Redirect and SimpleSign signature checks require octetString, which must match the parsed message, SigAlg, and RelayState.

    2.15.0release notes

  • Redirect-binding messages are limited to 1 MB after inflation.

    2.15.0release notes

  • A context-aware template renderer is available for customTagReplacement callbacks and strict rendering.

    2.15.0release notes

  • Signatures must be enveloped in the element they sign, and every signature must cover its containing element; requests and logout messages require a root signature.

    2.15.0release notes

  • SignatureVerifierOptions.signatureAlgorithm is ignored; use allowedSignatureAlgorithms.

    2.15.0release notes

  • Bearer confirmation is required, confirmation validity windows and every SessionNotOnOrAfter are checked, and assertions without NotOnOrAfter are rejected.

    2.15.0release notes

  • Metadata certificates must be base64 and tagPrefix values must be XML names.

    2.15.0release notes

  • Any invalid signature now fails the message, and setting wantMessageSigned to true requires a signed Response.

    2.15.0release notes

  • Peer metadata must declare a signing certificate, and a certificate in the message must match it; KeyDescriptor use is honored.

    2.15.0release notes

  • Malformed XML, DTDs, and characters outside the XML range are rejected before schema validation.

    2.15.0release notes

  • TypeScript users who imported xmldom's Options type should use DOMParserOptions.

    2.14.0release notes

  • Parse error messages are wrapped by xmldom's ParseError; code matching exact messages should switch to substring or regex matching.

    2.14.0release notes

  • Malformed or non-XML input now fails with a parse error instead of producing a partial document; metadata with two root EntityDescriptor elements is rejected.

    2.14.0release notes

  • Omitting signingAlgorithm now selects RSA-SHA256 instead of RSA-SHA1; callers requiring SHA-1 must pass signatureAlgorithms.RSA_SHA1 explicitly.

    2.13.1release notes

  • Unknown signature-algorithm URIs now throw this error instead of silently downgrading to SHA-1, rejecting malformed algorithms and preventing a verification-downgrade vector.

    2.13.1release notes

  • Promises now reject with Error instances instead of raw strings.

    2.13.0release notes

  • Unknown signature algorithms are rejected.

    2.13.0release notes

Security 11

  • The upgraded XML encryption dependency brings a fix for the Okta EncryptedAssertion layout.

    2.15.1release notes

  • The upgraded XML encryption dependency includes @xmldom/xmldom 0.8.13, which addresses CVE-2026-34601.

    2.15.1release notes

  • SP and IdP settings now restrict accepted signature and digest algorithms on every binding; unset preserves existing behavior.

    2.15.0release notes

  • The new inResponseTo option checks that a login response answers a request you issued; it accepts one ID or an array.

    2.15.0release notes

  • The API is hardened but deprecated and will be removed in v3; use SamlLib.renderTemplate instead.

    2.15.0release notes

  • Setting templateRenderer to strict on the SP or IdP enables a context-aware renderer that rejects placeholders in unsafe positions.

    2.15.0release notes

  • Options now merge the XXE-safe errorHandler baseline instead of replacing it, so empty or partial options no longer silently disable XXE protection; callers may still override it explicitly.

    2.13.1release notes

  • samlify: XML Injection in AttributeValue Allows Privilege Escalation in Signed SAML Assertions

    2.13.0security advisory

  • An XXE bypass was fixed.

    2.13.0release notes

  • Addresses XPath injection as part of a security audit.

    2.12.0release notes

  • Adds XXE protection as part of a security audit.

    2.12.0release notes

New APIs and options 13

  • Setting allowUnsolicitedResponse to false on the SP rejects IdP-initiated responses.

    2.15.0release notes

  • The extract now exposes assertionID, signed SubjectConfirmationData, and AudienceRestriction.

    2.15.0release notes

  • Redirect and SimpleSign parse results now include the RelayState covered by the signature.

    2.15.0release notes

  • An SP replayCache with saveIfAbsent(key, expiresAt) rejects assertions already accepted; samlify does not provide a store.

    2.15.0release notes

  • createLoginRequest supports specifying AssertionConsumerServiceIndex per request.

    2.13.0release notes

  • IdP metadata now supports the elementsOrder option.

    2.13.0release notes

  • createLoginRequest supports specifying ForceAuthn per request.

    2.13.0release notes

  • Login and logout requests can specify RelayState per request.

    2.13.0release notes

  • RSASSA-PSS signature algorithms are supported.

    2.13.0release notes

  • SimpleSign binding is supported for logout requests and responses.

    2.13.0release notes

  • IdP configuration now supports tagPrefix.assertion.

    2.13.0release notes

  • IdP configuration now supports tagPrefix.protocol.

    2.13.0release notes

  • Support was added for encrypted assertions, allowing developers to use them with samlify.

    2.10.2release notes

Behavior and default changes 5

  • Braces in template values are emitted as numeric character references, preserving the same text when parsed.

    2.15.0release notes

  • The default is now false; accepting an unsigned logout message logs a warning. The default is planned to become true in v3.

    2.15.0release notes

  • Importing samlify no longer adds browser DOM globals or DOM fetch/BodyInit types to TypeScript projects, including Node-only projects.

    2.14.0release notes

  • setDOMParserOptions accepts xmldom 0.9's onError(level, message) option instead of the deprecated errorHandler; the old object form remains supported through conversion.

    2.14.0release notes

  • SP signatureConfig now has a default when wantMessageSigned is true.

    2.13.0release notes

Fixes and other changes 9

  • Verification now accepts any salt length, including the digest-length salt used by spec-compliant peers.

    2.15.1release notes

  • The body field type is now Record<string, unknown>, restoring TypeScript compatibility with Express and other web framework request objects.

    2.13.1release notes

  • The query field type is now Record<string, unknown>, restoring TypeScript compatibility with Express and other web framework request objects.

    2.13.1release notes

  • Attributes with null or undefined values are omitted from AuthnRequest.

    2.13.0release notes

  • customTagReplacement is invoked even when no explicit template is provided.

    2.13.0release notes

  • The metadata conflict error now surfaces SP and IdP signing flags.

    2.13.0release notes

  • A clear error is thrown when redirect binding has no SSO or SLO endpoint.

    2.13.0release notes

  • createLogoutRequest now passes through SessionIndex.

    2.13.0release notes

  • Maintains the CommonJS build.

    2.12.0release notes