Skip to content

fix: remove vulnerable transitive dependency - beanutils#7705

Merged
jeremylong merged 1 commit intomainfrom
beanutils
Jun 4, 2025
Merged

fix: remove vulnerable transitive dependency - beanutils#7705
jeremylong merged 1 commit intomainfrom
beanutils

Conversation

@jeremylong
Copy link
Copy Markdown
Collaborator

resolves #7704

@jeremylong jeremylong requested a review from aikebah June 3, 2025 10:51
@jeremylong
Copy link
Copy Markdown
Collaborator Author

@aikebah see any issues with this one?

@aikebah
Copy link
Copy Markdown
Collaborator

aikebah commented Jun 3, 2025

@jeremylong Looks fine to me, but given that only RetireJS uses commons-validator, and uses it only for a URL validity check we might even fully remove commons-validator dependency as a whole and replace it by our own helper method.

For the purposes of reference URL checking I think it would suffice to do a non-null check followed by construction of a URI for non-null strings and a call to Uri#toUrl()and treat URISyntaxException and MalformedURLException as indicators that the string is not a valid URL (return false from the helper method) . It would not introduce new try-catch guards, as commons-validator is also constructing a URI catching URISyntaxException as one of the early parts of its (more extensive) checks on URL validity.

It would save future version-bumps on commons-validator releases and reduces the transitive dependency set at runtime (commons-beanutils itself would still be present as a test-dependency of mockserver (via velocity-tools-generic) in the dependency-check-utils module)

@jeremylong jeremylong merged commit 0e0cd58 into main Jun 4, 2025
5 checks passed
@jeremylong jeremylong added this to the 12.1.2 milestone Jun 4, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 5, 2025
@jeremylong jeremylong deleted the beanutils branch September 20, 2025 12:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CVE-2025-48734

2 participants