braintree is vulnerable to Path Traversal
59
Medium Risk
The AddressGateway builds HTTP request paths by interpolating the caller-supplied address_id directly into the URL for the find, update, and delete operations. Before 4.40.0 that address_id was not validated (only a nil/blank guard on find, nothing on update/delete), so when an application forwards an externally influenced identifier, a value containing path separators or relative-path segments such as ../../foo can alter the intended endpoint and reach unintended API paths. The related customer_id, dispute_id, and evidence_id identifiers were already validated by an equivalent character allowlist; the fix adds a shared Util.invalid_path_segment? helper and, critically, now applies it to address_id as well.
You are affected if you are running a version in the vulnerable range and your application passes an externally influenced identifier as the address_id argument to AddressGateway#find, #update, or #delete (for example an id derived from an incoming request). The customer_id, dispute_id, and evidence_id paths were already validated before this release, so they are not the vector.
braintree is vulnerable to Path Traversal in versions 1.0.0 - 4.39.0.
Upgrade the braintree library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant