-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.ProposalProposal-AcceptedSecurity
Milestone
Description
In
Line 64 in f882d89
| name := filepath.Join(dir, prefix+nextRandom()+suffix) |
prefix and suffix extracted from the variable pattern are used in filepath.Join. Since there is no filtering in place, this could lead to directory traversal vulnerabilities.
For example, the following value for pattern can create an unexpected behaviour:
ioutil.TempFile("/tmp", path.Base("../../somewhere/else.*.suffix"))
A less-surprising behaviour would be to call path.Base:
name := filepath.Join(dir, path.Base(prefix+nextRandom()+suffix))
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.ProposalProposal-AcceptedSecurity