Repository navigation
Jlc/saml security backport - #98
Merged
Merged
Conversation
johanseto
force-pushed
the
jlc/saml-security-backport
branch
from
October 1, 2026 20:42
f5d8299 to
15a7d1f
Compare
andrey-canon
force-pushed
the
open-release/teak.nelp
branch
from
October 1, 2026 20:57
fa870d0 to
e57b2e4
Compare
Adds `validate_saml_metadata_url()` to `third_party_auth/utils.py` which enforces HTTPS and blocks requests to loopback, link-local, and reserved addresses unconditionally, and RFC 1918 private ranges by default (configurable via `SAML_METADATA_URL_ALLOW_PRIVATE_IPS`). The validator is called in three places where user-supplied metadata URLs are fetched: `fetch_metadata_xml()` in utils.py, the inline fetch in `tasks.py::fetch_saml_metadata`, and `sync_provider_data` in the SAMLProviderDataViewSet. A 30-second timeout is also added to all `requests.get()` calls that were previously unbounded. Fixes GHSA-328g-7h4g-r2m9. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
E7670: setting annotation (SAML_METADATA_URL_ALLOW_PRIVATE_IPS) cannot have a boolean value (setting-boolean-default-value) pylint
johanseto
force-pushed
the
jlc/saml-security-backport
branch
from
October 1, 2026 21:03
15a7d1f to
48d006a
Compare
andrey-canon
approved these changes
Oct 1, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backports the SAML metadata URL validation fix from openedx/openedx-platform@70a5624 to address GHSA-328g-7h4g-r2m9.
The backport prevents SSRF when retrieving SAML metadata by validating user-supplied URLs and adds request timeouts. It also includes a compatibility commit that defines the required settings in both LMS and CMS configuration.
This affects Operators and users who configure third-party SAML authentication providers.
Supporting information
• Upstream fix: openedx@70a5624
• Security advisory: GHSA-328g-7h4g-r2m9
Testing instructions
pytest common/djangoapps/third_party_auth/tests/test_utils.py
Deadline
None.
Other information
The compatibility commit adds the new SAML metadata URL settings to both lms/envs/common.py and cms/envs/common.py .