Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Closed Unassigned: PathHelper causes OS command injection vulnerability [9344]

$
0
0
An OS command injection flaw was discovered after running static analysis security testing on the project that references ClosedXML library. The issue was caused by the two methods below included in [PathHelper](https://closedxml.codeplex.com/SourceControl/latest#ClosedXML/ClosedXML/ClosedXML/PathHelper.cs) :
```
public static void OpenFileFolder(string filePath)
{
string cmdLine = string.Format("/select,\"{0}\"", filePath);
Process.Start(@"explorer.exe", cmdLine);
}

public static void OpenFile(string filePath)
{
Process.Start(filePath);
}
```
Is it possible to remove those methods as they are not being used by any part of the library or its examples?
Comments: Thanks, I don't know how those got in there.

Viewing all articles
Browse latest Browse all 1877

Trending Articles