@@ -9,8 +9,9 @@ Ruby SAML minor versions may introduce breaking changes. Please read
99
1010## Vulnerability Notice
1111
12- ** There is a critical vulnerability affecting ruby-saml < 1.17.0 (CVE-2024 -45409).
13- Make sure you are using an updated version. (1.12.3 is safe)**
12+ There are ** critical vulnerabilities** affecting ruby-saml < 1.18.0 which allow
13+ SAML authentication bypass (CVE-2024 -45409, CVE-2025 -25291, CVE-2025 -25292, CVE-2025 -25293).
14+ ** Please upgrade to a fixed version (1.18.0 or 2.0.0) as soon as possible.**
1415
1516## Overview
1617
@@ -589,7 +590,7 @@ settings.security[:digest_method] = RubySaml::XML::SHA1
589590settings.security[:signature_method ] = RubySaml ::XML ::RSA_SHA1
590591```
591592
592- #### Signing SP Metadata
593+ ### Signing SP Metadata
593594
594595You may add a ` <ds:Signature> ` digital signature element to your SP Metadata XML using the following setting:
595596
@@ -600,7 +601,7 @@ settings.private_key = "PRIVATE KEY TEXT WITH BEGIN/END HEADER AND FOOTER"
600601settings.security[:metadata_signed ] = true # Enable signature on Metadata
601602```
602603
603- #### Signing SP SAML Messages
604+ ### Signing SP SAML Messages
604605
605606Ruby SAML supports SAML request signing. You (the SP) will sign the
606607request/responses with your private key. The IdP will then validate the signature
@@ -627,7 +628,7 @@ Note that the RelayState parameter is used when creating the Signature on the `H
627628Remember to provide it to the Signature builder if you are sending a ` GET RelayState ` parameter or the
628629signature validation process will fail at the IdP.
629630
630- #### Decrypting IdP SAML Assertions
631+ ### Decrypting IdP SAML Assertions
631632
632633Ruby SAML supports EncryptedAssertion. The IdP will encrypt the Assertion with the
633634public cert of the SP. The SP will decrypt the EncryptedAssertion with its private key.
@@ -642,7 +643,7 @@ settings.private_key = "PRIVATE KEY TEXT WITH BEGIN/END HEADER AND FOOTER"
642643settings.security[:want_assertions_encrypted ] = true # Invalidate SAML messages without an EncryptedAssertion
643644```
644645
645- #### Verifying Signature on IdP Assertions
646+ ### Verifying Signature on IdP Assertions
646647
647648You may require the IdP to sign its SAML Assertions using the following setting.
648649With will add ` <md:SPSSODescriptor WantAssertionsSigned="true"> ` to your SP Metadata XML.
@@ -653,7 +654,7 @@ present in the IdP's metadata.
653654settings.security[:want_assertions_signed ] = true # Require the IdP to sign its SAML Assertions
654655```
655656
656- #### Certificate and Signature Validation
657+ ### Certificate and Signature Validation
657658
658659You may require SP and IdP certificates to be non-expired using the following settings:
659660
@@ -669,7 +670,7 @@ validation fails. You may disable such exceptions using the `settings.security[:
669670settings.security[:soft ] = true # Do not raise error on failed signature/certificate validations
670671```
671672
672- #### Advanced SP Certificate Usage & Key Rollover
673+ ### Advanced SP Certificate Usage & Key Rollover
673674
674675Ruby SAML provides the ` settings.sp_cert_multi ` parameter to enable the following
675676advanced usage scenarios:
@@ -711,12 +712,12 @@ Note the following:
711712 inactive/expired certificates. This avoids validation errors when the IdP reads the SP
712713 metadata.
713714
714- #### Key Algorithm Support
715+ ### Key Algorithm Support
715716
716717Ruby SAML supports RSA, DSA, and ECDSA keys for both SP and IdP certificates.
717718JRuby cannot support ECDSA due to a [ known issue] ( https://github.com/jruby/jruby-openssl/issues/257 ) .
718719
719- #### Audience Validation
720+ ### Audience Validation
720721
721722A service provider should only consider a SAML response valid if the IdP includes an <AudienceRestriction >
722723element containting an <Audience > element that uniquely identifies the service provider. Unless you specify
@@ -739,7 +740,7 @@ is invalid using the `settings.security[:strict_audience_validation]` parameter.
739740settings.security[:strict_audience_validation ] = true
740741```
741742
742- ## Single Log Out
743+ ### Single Log Out
743744
744745Ruby SAML supports SP-initiated Single Logout and IdP-Initiated Single Logout.
745746
@@ -860,7 +861,7 @@ def logout
860861end
861862```
862863
863- ## Clock Drift
864+ ### Clock Drift
864865
865866If during validation of the response you get the error "Current time is earlier than NotBefore condition",
866867this may be due to clock differences between your system and that of the IdP.
@@ -877,7 +878,7 @@ response = RubySaml::Response.new(params[:SAMLResponse], allowed_clock_drift: 1.
877878
878879Make sure to keep the value as comfortably small as possible to keep security risks to a minimum.
879880
880- ## Deflation Limit
881+ ### Deflation Limit
881882
882883To protect against decompression bombs (a form of DoS attack), SAML messages are limited to 250,000 bytes by default.
883884Sometimes legitimate SAML messages will exceed this limit,
@@ -898,7 +899,7 @@ def saml_settings
898899end
899900```
900901
901- ## Attribute Service
902+ ### Attribute Service
902903
903904To request attributes from the IdP the SP needs to provide an attribute service within it's metadata and reference the index in the assertion.
904905
915916
916917The ` attribute_value ` option additionally accepts an array of possible values.
917918
918- ## SP-Originated Message IDs
919+ ### SP-Originated Message IDs
919920
920921Ruby SAML automatically generates message IDs for SP-originated messages (AuthNRequest, etc.)
921922By default, this is a UUID prefixed by the ` _ ` character, for example ` "_ea8b5fdf-0a71-4bef-9f87-5406ee746f5b" ` .
@@ -924,7 +925,7 @@ Note that the SAML specification requires that this type (`xsd:ID`) be an
924925[ NCName] ( https://www.w3.org/TR/xmlschema-2/#NCName ) , meaning that it must start with a letter
925926or underscore, and can only contain letters, digits, underscores, hyphens, and periods.
926927
927- ## Custom Metadata Fields
928+ ### Custom Metadata Fields
928929
929930Some IdPs may require to add SPs to add additional fields (Organization, ContactPerson, etc.)
930931into the SP metadata. This can be achieved by extending the ` RubySaml::Metadata `
948949MyMetadata .new .generate(settings)
949950```
950951
951- ## Adding Features, Pull Requests
952+ ## Contributing
953+
954+ ### Pay it Forward: Support RubySAML and Strengthen Open-Source Security
955+
956+ RubySAML is a trusted authentication library used by startups and enterprises alike—
957+ a community-driven alternative to costly third-party services.
958+
959+ But security doesn't happen in a vacuum. Vulnerabilities in authentication libraries can
960+ have widespread consequences. Maintaining open-source security requires continuous
961+ effort, expertise, and funding. By supporting RubySAML, you’re not just securing your
962+ own systems—you’re strengthening auth security globally. Instead of paying for closed
963+ solutions, consider investing in the community that does the real security work.
964+
965+ #### How you can help
966+
967+ * Sponsor RubySAML: [ GitHub Sponsors] ( https://github.com/sponsors/SAML-Toolkits )
968+ * Contribute to secure-by-design improvements
969+ * Responsibly report vulnerabilities (see "Vulnerability Reporting" above)
970+
971+ Security is a shared responsibility. If RubySAML has helped your organization, please
972+ consider giving back. Together, we can keep authentication secure—without putting it
973+ behind paywalls.
974+
975+ ### Adding Features, Pull Requests
952976
953977* Fork the repository
954978* Make your feature addition or bug fix
@@ -957,12 +981,18 @@ MyMetadata.new.generate(settings)
957981* Do not change rakefile, version, or history.
958982* Open a pull request, following [ this template] ( https://gist.github.com/Lordnibbler/11002759 ) .
959983
960- ## Attribution
984+ ### Sponsors
985+
986+ Thanks to the following sponsors for securing the open source ecosystem.
987+
988+ [ <img alt =" 84codes " src =" https://avatars.githubusercontent.com/u/5353257 " width =" 75px " >] ( https://www.84codes.com )
989+
990+ ### Attribution
961991
962992Portions of the code in ` RubySaml::XML ` namespace is adapted from earlier work
963993copyrighted by either Oracle and/or Todd W. Saxton. The original code was distributed
964- under the Common Development and Distribution License (CDDL) 1.0. This code is planned to
965- be written entirely in future versions .
994+ under the Common Development and Distribution License (CDDL) 1.0. This code is
995+ currently in the process of being rewritten .
966996
967997## License
968998
0 commit comments