Skip to content

fix: sanitize URL when fetching azure attested data intermediate cert#62158

Merged
nklaassen merged 1 commit intomasterfrom
nklaassen/azure-fix
Dec 19, 2025
Merged

fix: sanitize URL when fetching azure attested data intermediate cert#62158
nklaassen merged 1 commit intomasterfrom
nklaassen/azure-fix

Conversation

@nklaassen
Copy link
Copy Markdown
Contributor

@nklaassen nklaassen commented Dec 11, 2025

Fixes https://github.com/gravitational/teleport-private/issues/2226

The bug is best described in the linked issue. To summarize, when fetching the intermediate certificate for an Azure VM attested data signature, the intermediate cert URL is taken from the yet-unverified attested data signing cert and not validated before making an HTTP request to that URL, causing a potential SSRF vulnerability.

Auth only fetches the intermediate CA cert over the network when nodes join via the legacy join service. The new azure join method (added in #61129) avoids this by having the joining client include the intermediate cert in the join request.

The fix here maintains compatibility with older agents joining via the legacy join service. Before fetching the intermediate CA, the URL is sanitized to exactly match http://www.microsoft.com/pkiops/certs/<cert-name>.crt. This may break if Microsoft ever changes this URL format, but hopefully everything will be using the new join service by then and it won't matter.

Manual Test Plan

  • invalid issuing certificate URLs are rejected
  • azure join method still works for agents using legacy join method

changelog: Fixed a potential SSRF vulnerability in the Azure join method implementation

@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from eriktate December 19, 2025 17:05
@nklaassen nklaassen enabled auto-merge December 19, 2025 17:09
@nklaassen nklaassen added this pull request to the merge queue Dec 19, 2025
Merged via the queue into master with commit 095e042 Dec 19, 2025
49 checks passed
@nklaassen nklaassen deleted the nklaassen/azure-fix branch December 19, 2025 17:30
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@nklaassen See the table below for backport results.

Branch Result
branch/v17 Failed
branch/v18 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants