Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
Is there a security risk/vulnerability in having a page on your site that can effectively redirect to any other page on the site?

Let's say I have this controller action

    public IActionResult LandingPage(string path)
    {
        ViewBag.path = path;
        return View();
    }

and in that view is just javascript that will take that path variable out of the viewbag and redirect to whatever's in it like below

<script>         
    var path= '@ViewBag.path';
    window.location.replace('../' + path);
</script>

essentially allowing for the client to reach any path on the site. Does this pose any security risks in allowing a savvy user to put whatever they want in the redirect path?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!