[AppSecAI Agent] fast-uri vulnerable to server-side request forgery via malformed IPv6 normalization - #644
Open
conviso-platform-appsec-staging[bot] wants to merge 1 commit into
Conversation
…IPv6 normalization (Conviso Issue 1713785)
Conviso Security Gate — No Security Gate rule configuredNo No new findings were introduced by this pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AppSecAI Agent
Issue ID: 1713785
Title: fast-uri vulnerable to server-side request forgery via malformed IPv6 normalization
Severity: HIGH
Type: ScaFinding
Description
Impact
fast-uridoes not validate the complete RFC 3986 grammar for bracketed IPv6 literals, so a malformed literal with invalid trailing text is silently truncated to a different valid IPv6 address with no error reported. For example,normalize('http://[::not-valid]/private')returnshttp://[::]/private, and[fc00::not-hex]and[fe80::not-hex]collapse to[fc00::]and[fe80::]. An application that normalizes an untrusted URL before an outbound request, redirect, or host-policy check can be routed to a local or private address such as loopback (::1), unique-local, or link-local. Becauseparse().erroris unset for these inputs, checking it does not protect the consumer.Patches
Upgrade to
fast-uri2.4.5, 3.1.6, or 4.1.3. Malformed IPv6 literals are now rejected with a host error instead of being normalized to a valid address.Workarounds
Reject untrusted URLs whose host is a bracketed IPv6 literal before passing them to
fast-uri, or route outbound requests against an explicit allowlist of addresses rather than trusting the normalized host.Fix Details
Security Fix: Upgrade fast-uri to resolve SSRF vulnerability
Summary
This PR fixes a HIGH severity security vulnerability in the
fast-uripackage by adding a resolution to enforce the use of a patched version.Vulnerability Details
fast-uriDescription
fast-uriversions prior to 3.1.6 do not validate the complete RFC 3986 grammar for bracketed IPv6 literals. A malformed IPv6 literal with invalid trailing text is silently truncated to a different valid IPv6 address without reporting any error.For example:
normalize('http://[::not-valid]/private')returnshttp://[::]/private[fc00::not-hex]collapses to[fc00::][fe80::not-hex]collapses to[fe80::]This behavior can allow an attacker to craft a malformed URL that, after normalization, resolves to a local or private address (such as loopback
::1, unique-local, or link-local addresses). Sinceparse().erroris not set for these malformed inputs, checking it does not protect consumers.Fix
Added
"fast-uri": "^3.1.6"to theresolutionsfield inpackage.json. This forces Yarn to use the patched version offast-uri(3.1.6 or later) across all transitive dependencies, ensuring that malformed IPv6 literals are now properly rejected with a host error instead of being silently normalized to a valid address.This PR was automatically created by Conviso Platform Auto-Fix.