# CVE-2025-23206: IAM OIDC custom resource allows connection to unauthorized OIDC provider in aws-cdk

> AWS CDK IAM OIDC provider allows insecure TLS connections by default, potentially enabling MITM attacks unless a specific feature flag is enabled.

- **Severity:** Low 1.8 (`CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 17 Jan 2025
- **Updated:** 23 Jan 2026
- **Also known as:** GHSA-v4mq-x674-ff73

## What is CVE-2025-23206?

CVE-2025-23206 is a low-severity vulnerability in aws-cdk, published on 17 Jan 2025. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

The AWS Cloud Development Kit (AWS CDK) is an open-source software development framework to define cloud infrastructure in code and provision it through AWS CloudFormation. Users who use IAM OIDC custom resource provider package will download CA Thumbprints as part of the custom resource workflow. 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. The patch is in progress. To mitigate, upgrade to CDK v2.177.0 (Expected release date 2025-02-22). Once upgraded, users should make sure the feature flag '@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections' is set to true in `cdk.context.json` or `cdk.json`. There are no known workarounds for this vulnerability.

Weakness: CWE-347 (Improper Verification of Cryptographic Signature)

## Which versions are affected by CVE-2025-23206?

2 open source packages ship an affected version, including aws-cdk-lib. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `aws-cdk-lib` | npm | All versions | 2.177.0 |
| `aws-cdk-lib` | npm | All versions | 2.177.0 |

Products: Amazon Aws Cloud Development Kit.

## How do I fix CVE-2025-23206?

Upgrade aws-cdk-lib to 2.177.0 or later.

## Is CVE-2025-23206 being exploited?

There is no known exploitation of CVE-2025-23206 in the wild and no public exploit code.

## Other vulnerabilities in aws-cdk

- [CVE-2023-35165](https://insights.sbomify.com/CVE-2023-35165/): AWS CDK EKS overly permissive trust policies (medium 6.6)
- [CVE-2024-45037](https://insights.sbomify.com/CVE-2024-45037/): AWS CDK RestApi not generating authorizationScope correctly in resultant CFN template (medium 6.4)
- [CVE-2025-2598](https://insights.sbomify.com/CVE-2025-2598/): AWS CDK CLI prints AWS credentials retrieved by custom credential plugins (medium 5.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-23206 and fix it if it is affected.

What it is: CVE-2025-23206 is a low-severity vulnerability in aws-cdk, published on 17 Jan 2025. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2025-23206 in the wild and no public exploit code.

Affected packages and fixed versions:
- aws-cdk-lib (npm): affected all versions; fixed in 2.177.0
- aws-cdk-lib (npm): affected all versions; fixed in 2.177.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-23206/ (Markdown: https://insights.sbomify.com/CVE-2025-23206/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-23206
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-23206
- OSV: https://osv.dev/vulnerability/CVE-2025-23206

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-23206/
Summaries are generated and may contain mistakes; the official description above is the record.
