CDK custom resource CustomCDKBucketDeployment (Python urllib3) vulnerability
Describe the bug
The library urllib3 version 2.4.0 was detected is vulnerable to CVE-2025-50182 According our findings the vulnerability can be remediated by updating the library to version 2.5.0 or higher, using pip install --upgrade urllib3.
Regression Issue
- [ ] Select this option if this issue appears to be a regression.
Last Known Working CDK Library Version
No response
Expected Behavior
Description from vulnerable findings:
urllib3 is a user-friendly HTTP client library for Python. Prior to 2.5.0, urllib3 does not control redirects in browsers and Node.js. urllib3 supports being used in a Pyodide runtime utilizing the JavaScript Fetch API or falling back on XMLHttpRequest. This means Python libraries can be used to make HTTP requests from a browser or Node.js. Additionally, urllib3 provides a mechanism to control redirects, but the retries and redirect parameters are ignored with Pyodide; the runtime itself determines redirect behavior. This issue has been patched in version 2.5.0.
Current Behavior
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
AWS CDK Library version (aws-cdk-lib)
2.202.0
AWS CDK CLI version
2.2.238
Node.js Version
OS
MacOS
Language
Python
Language Version
No response
Other information
No response
@kretsh Could elaborate on the issue ?
Did you manually check the urllib3 version associated with any specific cdk lib versions ?
I am investigating the issue but if you have any leads it would be helpful (maybe a reproduction snippet)
hi @kumvprat.
So this vulnerability finding I have in wiz.io it's referencing to our AWS Lambda function (CustomCDKBucketDeployment).
Here is the description:
The library urllib3 version 2.4.0 was detected in PIP library manager located at /layers/index/0/codeSha256/0ad660dbdc7bd72a300904f943746251dae4768bd0aa5a96b433955a2983589c/awscli/urllib3-2.4.0.dist-info/METADATA and is vulnerable to CVE-2025-50181, which exists in versions < 2.5.0.
And we are not using urllib3 on our side.
May be it would help, I found previously the same problem in Github issues looks like previous problem was fixed in v2.106.0 but I could not find in a patch log any information regarding this problem.
I think this is coming from aws-cdk-lib/aws-s3-deployment
Is there any update on this yet? Currently, we can still see our Security Finding in wiz.io Thanks!
Thank you for reaching out about CVE-2025-50182. We can confirm that this issue does not affect the AWS CDK as boto3 is not compatible with web browser based python environments for which CVE-2025-50182 applies to.
While this specific concern does not affect the CDK, we always recommend keeping your dependencies up to date with the latest versions as a general best practice.
Use the latest version of cdk to be up-to-date on all functionalities : v2.206.0
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.