Skip to content

Commit d8a57ab

Browse files
boshartdutyclaude
andcommitted
test: demonstrate CVE-2025-68470 open redirect vulnerability
Comment out the security fix to show failing tests that demonstrate the open redirect vulnerability via double-slash pathnames. The fix is available in PR remix-run#981: remix-run#981 References: - CVE-2025-68470 - GHSA-9jcx-v3wj-wh4m Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 19483c0 commit d8a57ab

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

modules/LocationUtils.js

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,22 @@ export function createLocation(path, state, key, currentLocation) {
4848
}
4949
}
5050

51+
// COMMENTED OUT FOR BUG REPORT - The following fix addresses CVE-2025-68470
52+
// See PR #981 for the complete fix: https://github.com/remix-run/history/pull/981
53+
//
5154
// Security fix: Normalize embedded double-slashes to prevent open redirect vulnerability (CVE-2025-68470)
5255
// Paths like "//evil.com" could be interpreted as protocol-relative URLs leading to external redirects
53-
if (location.pathname && location.pathname.includes('//')) {
54-
const oldPathname = location.pathname;
55-
location.pathname = location.pathname.replace(/\/\/+/g, '/');
56-
warning(
57-
false,
58-
'Pathnames cannot have embedded double slashes - normalizing ' +
59-
oldPathname +
60-
' -> ' +
61-
location.pathname
62-
);
63-
}
56+
// if (location.pathname && location.pathname.includes('//')) {
57+
// const oldPathname = location.pathname;
58+
// location.pathname = location.pathname.replace(/\/\/+/g, '/');
59+
// warning(
60+
// false,
61+
// 'Pathnames cannot have embedded double slashes - normalizing ' +
62+
// oldPathname +
63+
// ' -> ' +
64+
// location.pathname
65+
// );
66+
// }
6467

6568
if (key) location.key = key;
6669

0 commit comments

Comments
 (0)