React Router is a router for React. In versions 7.0.0 through 7.14.0 and 6.7.0 through 6.30.3, certain URLs passed to the redirect function can trigger an open redirect to an external domain due to path values starting with // being reinterpreted as protocol-relative URLs. The level of impact depends on the validation done by the application prior to returning the redirect. This does not impact applications using Declarative Mode (<BrowserRouter>). This is patched in versions 7.14.1 and 6.30.4.
React Router versions 6.7.0-6.30.3 and 7.0.0-7.14.0 are vulnerable to open redirect attacks when URLs starting with // are misinterpreted as protocol-relative URLs in the redirect function. This vulnerability allows attackers to redirect users to external domains, potentially compromising user security and trust.
تحتوي إصدارات React Router المتأثرة على خلل في معالجة عناوين URL التي تبدأ بشرطة مائلة مزدوجة، حيث يتم تفسيرها كعناوين نسبية للبروتوكول بدلاً من المسارات النسبية. يمكن للمهاجمين استغلال هذا الخلل لإنشاء روابط خادعة تعيد توجيه المستخدمين إلى مواقع خارجية ضارة. التطبيقات التي تستخدم Declarative Mode لا تتأثر بهذه الثغرة.
تأثر إصدارات React Router 6.7.0-6.30.3 و7.0.0-7.14.0 بثغرات إعادة التوجيه المفتوحة عندما يتم إساءة تفسير عناوين URL التي تبدأ بـ // كعناوين نسبية للبروتوكول. يمكن لمهاجمين استخدام هذه الثغرة لإعادة توجيه المستخدمين إلى نطاقات خارجية، مما قد يؤثر على أمان وثقة المستخدم.
Upgrade React Router to version 7.14.1 or later for version 7.x, or version 6.30.4 or later for version 6.x. Implement strict URL validation before passing URLs to the redirect function, ensuring URLs do not start with // unless intentionally using protocol-relative URLs. Review application code for any custom redirect implementations and apply similar validation patterns.
قم بترقية React Router إلى الإصدار 7.14.1 أو أحدث للإصدار 7.x، أو الإصدار 6.30.4 أو أحدث للإصدار 6.x. طبق التحقق الصارم من صحة عناوين URL قبل تمريرها إلى دالة إعادة التوجيه، مع التأكد من عدم بدء عناوين URL بـ // إلا إذا كان الاستخدام مقصوداً. راجع كود التطبيق للبحث عن أي تطبيقات إعادة توجيه مخصصة وطبق أنماط التحقق المماثلة.