Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS12NG1xLXg2NzQtZmY3M84ABDg8

AWS Cloud Development Kit (AWS CDK) IAM OIDC custom resource allows connection to unauthorized OIDC provider

Impact

Users who use IAM OIDC custom resource provider package will download CA Thumbprints as part of the custom resource workflow, https://github.com/aws/aws-cdk/blob/d16482fc8a4a3e1f62751f481b770c09034df7d2/packages/%40aws-cdk/custom-resource-handlers/lib/aws-iam/oidc-handler/external.ts#L34.

However, the current tls.connect method will always set rejectUnauthorized: false which is a potential security concern. CDK should follow the best practice and set rejectUnauthorized: true. However, this could be a breaking change for existing CDK applications and we should fix this with a feature flag.

Note that this is marked as low severity Security advisory because the issuer url is provided by CDK users who define the CDK application. If they insist on connecting to a unauthorized OIDC provider, CDK should not disallow this. Additionally, the code block is run in a Lambda environment which mitigate the MITM attack.

As a best practice, CDK should still fix this issue under a feature flag to avoid regression.

packages/@aws-cdk/custom-resource-handlers/lib/aws-iam/oidc-handler/external.ts
❯❱ problem-based-packs.insecure-transport.js-node.bypass-tls-verification.bypass-tls-verification
Checks for setting the environment variable NODE_TLS_REJECT_UNAUTHORIZED to 0, which disables TLS
verification. This should only be used for debugging purposes. Setting the option rejectUnauthorized
to false bypasses verification against the list of trusted CAs, which also leads to insecure
transport.

Patches

The patch is in progress. To mitigate, upgrade to CDK v2.177.0 (Expected release date 2025-02-22).
Once upgraded, please make sure the feature flag '@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections' is set to true in cdk.context.json or cdk.json. More details on feature flag setting is here.

Workarounds

N/A

References

https://github.com/aws/aws-cdk/issues/32920

Permalink: https://github.com/advisories/GHSA-v4mq-x674-ff73
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS12NG1xLXg2NzQtZmY3M84ABDg8
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Low
Classification: General
Published: about 5 hours ago
Updated: about 4 hours ago


Identifiers: GHSA-v4mq-x674-ff73, CVE-2025-23206
References: Repository: https://github.com/aws/aws-cdk
Blast Radius: 0.0

Affected Packages

npm:aws-cdk-lib
Dependent packages: 2,095
Dependent repositories: 4,665
Downloads: 5,948,694 last month
Affected Version Ranges: <= 2.176.0
No known fixed version
All affected versions: 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 2.10.0, 2.11.0, 2.12.0, 2.13.0, 2.14.0, 2.15.0, 2.16.0, 2.17.0, 2.18.0, 2.19.0, 2.20.0, 2.21.0, 2.21.1, 2.22.0, 2.23.0, 2.24.0, 2.24.1, 2.25.0, 2.26.0, 2.27.0, 2.28.0, 2.28.1, 2.29.0, 2.29.1, 2.30.0, 2.31.0, 2.31.1, 2.31.2, 2.32.0, 2.32.1, 2.33.0, 2.34.0, 2.34.1, 2.34.2, 2.35.0, 2.36.0, 2.37.0, 2.37.1, 2.38.0, 2.38.1, 2.39.0, 2.39.1, 2.40.0, 2.41.0, 2.42.0, 2.42.1, 2.43.0, 2.43.1, 2.44.0, 2.45.0, 2.46.0, 2.47.0, 2.48.0, 2.49.0, 2.49.1, 2.50.0, 2.51.0, 2.51.1, 2.52.0, 2.52.1, 2.53.0, 2.54.0, 2.55.0, 2.55.1, 2.56.0, 2.56.1, 2.57.0, 2.58.0, 2.58.1, 2.59.0, 2.60.0, 2.61.0, 2.61.1, 2.62.0, 2.62.1, 2.62.2, 2.63.0, 2.63.1, 2.63.2, 2.64.0, 2.65.0, 2.66.0, 2.66.1, 2.67.0, 2.68.0, 2.69.0, 2.70.0, 2.71.0, 2.72.0, 2.72.1, 2.73.0, 2.74.0, 2.75.0, 2.75.1, 2.76.0, 2.77.0, 2.78.0, 2.79.0, 2.79.1, 2.80.0, 2.81.0, 2.82.0, 2.83.0, 2.83.1, 2.84.0, 2.85.0, 2.86.0, 2.87.0, 2.88.0, 2.89.0, 2.90.0, 2.91.0, 2.92.0, 2.93.0, 2.94.0, 2.95.0, 2.95.1, 2.96.0, 2.96.1, 2.96.2, 2.97.0, 2.97.1, 2.98.0, 2.99.0, 2.99.1, 2.100.0, 2.101.0, 2.101.1, 2.102.0, 2.102.1, 2.103.0, 2.103.1, 2.104.0, 2.105.0, 2.106.0, 2.106.1, 2.107.0, 2.108.0, 2.108.1, 2.109.0, 2.110.0, 2.110.1, 2.111.0, 2.112.0, 2.113.0, 2.114.0, 2.114.1, 2.115.0, 2.116.0, 2.116.1, 2.117.0, 2.118.0, 2.119.0, 2.120.0, 2.121.0, 2.121.1, 2.122.0, 2.123.0, 2.124.0, 2.125.0, 2.126.0, 2.127.0, 2.128.0, 2.129.0, 2.130.0, 2.131.0, 2.132.0, 2.132.1, 2.133.0, 2.134.0, 2.135.0, 2.136.0, 2.136.1, 2.137.0, 2.138.0, 2.139.0, 2.139.1, 2.140.0, 2.141.0, 2.142.0, 2.142.1, 2.143.0, 2.143.1, 2.144.0, 2.145.0, 2.146.0, 2.147.0, 2.147.1, 2.147.2, 2.147.3, 2.148.0, 2.148.1, 2.149.0, 2.150.0, 2.151.0, 2.151.1, 2.152.0, 2.153.0, 2.154.0, 2.154.1, 2.155.0, 2.156.0, 2.157.0, 2.158.0, 2.159.0, 2.159.1, 2.160.0, 2.161.0, 2.161.1, 2.162.0, 2.162.1, 2.163.0, 2.163.1, 2.164.0, 2.164.1, 2.165.0, 2.166.0, 2.167.0, 2.167.1, 2.167.2, 2.168.0, 2.169.0, 2.170.0, 2.171.0, 2.171.1, 2.172.0, 2.173.0, 2.173.1, 2.173.2, 2.173.3, 2.173.4, 2.174.0, 2.174.1, 2.175.0, 2.175.1, 2.176.0