Skip to content

Alaa-abdulridha/path.combine.poc

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Path.Combine path traversal vulnerability ASP.NET CORE

Study case for path traversal vulnerability on path.combine function in the asp.net core.

  • Line 14 is the data input parameter to pass data to the vulnerable function.

  • Line 21 is the vulnerable function that combining the temp path with the data input from the parameter.

  • If you comment line 20 the code will be sanitized and the vulnerability will be fixed by using Path.GetFileName(); to sanitize the file name.

About

Study case for path traversal vulnerability on path.combine function in the asp.net core

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages