Repository navigation
Add PotentiallyUnguardedProtocolHandler query for Java and C++ #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
05212aa
init: add PotentiallyUnguardedProtocolHandler query
ex0dus-0x 4664d38
add legacy protocol handler support
ex0dus-0x b2d7c37
add support for C++/Qt, and genericize shell execution models for all…
ex0dus-0x 7efd379
fix java tests
ex0dus-0x 4d28876
Add docs and fix CI/CD issue
ex0dus-0x e0d42d1
Fix up tests, and enhance query with better isBarrier
ex0dus-0x 0139581
Fix up tests
ex0dus-0x 5fb4693
fix stubs to pass test
ex0dus-0x b0f08a5
Merge branch 'main' into alan/untrusted-protocol-handle
ex0dus-0x 4f7ae91
[fix] update MaD indices due to pinned version
kumarak 6d3eef8
[fix]regenerate doc/QUERIES.md for new protocol handler queries
kumarak 534d120
Merge branch 'main' into alan/untrusted-protocol-handle
GrosQuildu 97279d1
Fix protocol handler queries and tests
GrosQuildu 551accb
Tighten Java protocol handler detection
GrosQuildu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
...rity/PotentiallyUnguardedProtocolHandler/PotentiallyUnguardedProtocolHandler.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Potentially unguarded protocol handler invocation | ||
| Desktop URL handlers accept every scheme registered with the operating system. Passing an untrusted URL to one of these handlers can invoke an unintended application or expose local resources. | ||
|
|
||
|
|
||
| ## Recommendation | ||
| Parse the URL and allow only the schemes required by the application before invoking the protocol handler. For web links, allow only HTTP and HTTPS. | ||
|
|
||
|
|
||
| ## Example | ||
|
|
||
| ```cpp | ||
| #include <QDesktopServices> | ||
| #include <QUrl> | ||
|
|
||
| void openUrl(const char *input) { | ||
| QDesktopServices::openUrl(QUrl(input)); // BAD | ||
| } | ||
|
|
||
| void openWebUrl(const char *input) { | ||
| QUrl url(input); | ||
| if (url.scheme() == "https") { | ||
| QDesktopServices::openUrl(url); // GOOD | ||
| } | ||
| } | ||
|
|
||
| ``` | ||
| The bad example opens an untrusted URL directly. The good example first checks that the URL uses HTTPS. | ||
|
|
||
|
|
||
| ## References | ||
| * CVE-2022-43550: [Jitsi Desktop Client RCE by interacting with malicious URL schemes](https://hackerone.com/reports/1692603) | ||
| * Common Weakness Enumeration: [CWE-939](https://cwe.mitre.org/data/definitions/939.html). |
13 changes: 13 additions & 0 deletions
13
cpp/src/security/PotentiallyUnguardedProtocolHandler/PotentiallyUnguardedProtocolHandler.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #include <QDesktopServices> | ||
| #include <QUrl> | ||
|
|
||
| void openUrl(const char *input) { | ||
| QDesktopServices::openUrl(QUrl(input)); // BAD | ||
| } | ||
|
|
||
| void openWebUrl(const char *input) { | ||
| QUrl url(input); | ||
| if (url.scheme() == "https") { | ||
| QDesktopServices::openUrl(url); // GOOD | ||
| } | ||
| } |
29 changes: 29 additions & 0 deletions
29
...rc/security/PotentiallyUnguardedProtocolHandler/PotentiallyUnguardedProtocolHandler.qhelp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| <!DOCTYPE qhelp SYSTEM "qhelp.dtd"> | ||
| <qhelp> | ||
| <overview> | ||
| <p> | ||
| Desktop URL handlers accept every scheme registered with the operating system. | ||
| Passing an untrusted URL to one of these handlers can invoke an unintended | ||
| application or expose local resources. | ||
| </p> | ||
| </overview> | ||
| <recommendation> | ||
| <p> | ||
| Parse the URL and allow only the schemes required by the application before | ||
| invoking the protocol handler. For web links, allow only HTTP and HTTPS. | ||
| </p> | ||
| </recommendation> | ||
| <example> | ||
| <sample src="PotentiallyUnguardedProtocolHandler.cpp" /> | ||
| <p> | ||
| The bad example opens an untrusted URL directly. The good example first | ||
| checks that the URL uses HTTPS. | ||
| </p> | ||
| </example> | ||
| <references> | ||
| <li> | ||
| CVE-2022-43550: <a href="https://hackerone.com/reports/1692603">Jitsi Desktop | ||
| Client RCE by interacting with malicious URL schemes</a> | ||
| </li> | ||
| </references> | ||
| </qhelp> |
147 changes: 147 additions & 0 deletions
147
cpp/src/security/PotentiallyUnguardedProtocolHandler/PotentiallyUnguardedProtocolHandler.ql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,147 @@ | ||
| /** | ||
| * @name Potentially unguarded protocol handler invocation | ||
| * @id tob/cpp/unguarded-protocol-handler | ||
| * @description Finds URL protocol handlers called with URLs from untrusted sources | ||
| * @kind path-problem | ||
| * @tags security | ||
| * external/cwe/cwe-939 | ||
| * @precision medium | ||
| * @problem.severity warning | ||
| * @security-severity 6.5 | ||
| * @group security | ||
| */ | ||
|
|
||
| import cpp | ||
| private import semmle.code.cpp.controlflow.IRGuards | ||
| private import semmle.code.cpp.ir.dataflow.TaintTracking | ||
| private import semmle.code.cpp.security.CommandExecution | ||
| private import semmle.code.cpp.security.FlowSources | ||
|
|
||
| predicate isProtocolHandlerLiteral(StringLiteral literal, string handlerType) { | ||
| literal.getValue().regexpMatch("(?i).*rundll32.*url\\.dll.*FileProtocolHandler.*") and | ||
| handlerType = "rundll32 url.dll,FileProtocolHandler" | ||
| or | ||
| literal.getValue().regexpMatch("(?i).*xdg-open.*") and | ||
| handlerType = "xdg-open" | ||
| or | ||
| literal.getValue().regexpMatch("(?i).*\\bopen\\b.*") and | ||
| not literal.getValue().regexpMatch("(?i).*xdg-open.*") and | ||
| handlerType = "open" | ||
| } | ||
|
|
||
| predicate localTaint(Expr source, Expr sink) { | ||
| exists(DataFlow::Node sourceNode, DataFlow::Node sinkNode | | ||
| source = [sourceNode.asExpr(), sourceNode.asIndirectExpr()] and | ||
| sink = [sinkNode.asExpr(), sinkNode.asIndirectExpr()] and | ||
| TaintTracking::localTaint(sourceNode, sinkNode) | ||
| ) | ||
| } | ||
|
|
||
| predicate isShellProtocolHandlerCall(FunctionCall call, string handlerType) { | ||
| call.getTarget() instanceof SystemFunction and | ||
| exists(StringLiteral literal | | ||
| isProtocolHandlerLiteral(literal, handlerType) and | ||
| localTaint(literal, call.getArgument(0)) | ||
| ) | ||
| } | ||
|
|
||
| predicate isAllowedScheme(StringLiteral literal, Expr length) { | ||
| literal.getValue() = "http://" and length.getValue() = "7" | ||
| or | ||
| literal.getValue() = "https://" and length.getValue() = "8" | ||
| } | ||
|
|
||
| predicate comparisonChecksSuccess(IRGuardCondition guard, FunctionCall call, boolean branch) { | ||
| exists(EqualityOperation comparison | | ||
| comparison = guard.getUnconvertedResultExpression() and | ||
| comparison.getAnOperand() = call and | ||
| comparison.getAnOperand().getValue() = "0" and | ||
| ( | ||
| comparison instanceof EQExpr and branch = true | ||
| or | ||
| comparison instanceof NEExpr and branch = false | ||
| ) | ||
| ) | ||
| } | ||
|
|
||
| predicate stringPrefixGuard(IRGuardCondition guard, Expr checked, boolean branch) { | ||
| exists(FunctionCall call, StringLiteral allowed, Expr length | | ||
| call.getTarget().getName() = ["strncmp", "strncasecmp", "_strnicmp"] and | ||
| isAllowedScheme(allowed, length) and | ||
| call.getArgument(2) = length and | ||
| ( | ||
| call.getArgument(0) = checked and call.getArgument(1) = allowed | ||
| or | ||
| call.getArgument(1) = checked and call.getArgument(0) = allowed | ||
| ) and | ||
| comparisonChecksSuccess(guard, call, branch) | ||
| ) | ||
| or | ||
| exists(FunctionCall call, StringLiteral allowed | | ||
| call = guard.getUnconvertedResultExpression() and | ||
| call.getTarget().hasQualifiedName("", "QString", "startsWith") and | ||
| call.getArgument(0) = allowed and | ||
| allowed.getValue() = ["http://", "https://"] and | ||
| checked = call.getQualifier() and | ||
| branch = true | ||
| ) | ||
| } | ||
|
|
||
| predicate urlSchemeGuardChecks(IRGuardCondition guard, Expr checked, boolean branch) { | ||
| stringPrefixGuard(guard, checked, branch) | ||
| or | ||
| exists(FunctionCall comparison, FunctionCall scheme, StringLiteral allowed | | ||
| comparison = guard.getUnconvertedResultExpression() and | ||
| comparison.getTarget().getName() = "operator==" and | ||
| scheme.getTarget().hasQualifiedName("", "QUrl", "scheme") and | ||
| scheme = comparison.getQualifier() and | ||
| comparison.getArgument(0) = allowed and | ||
| allowed.getValue() = ["http", "https"] and | ||
| checked = scheme.getQualifier() and | ||
| branch = true | ||
| ) | ||
| } | ||
|
|
||
| module PotentiallyUnguardedProtocolHandlerConfig implements DataFlow::ConfigSig { | ||
| predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource } | ||
|
|
||
| predicate isSink(DataFlow::Node sink) { | ||
| exists(FunctionCall call | | ||
| call.getTarget().hasQualifiedName("", "QDesktopServices", "openUrl") and | ||
| sink.asConvertedExpr() = call.getArgument(0) | ||
| ) | ||
| or | ||
| exists(FunctionCall call | | ||
| isShellProtocolHandlerCall(call, _) and | ||
| sink.asIndirectExpr() = call.getArgument(0) | ||
| ) | ||
| } | ||
|
|
||
| predicate isBarrier(DataFlow::Node node) { | ||
| node = DataFlow::BarrierGuard<urlSchemeGuardChecks/3>::getABarrierNode() | ||
| or | ||
| node = DataFlow::BarrierGuard<urlSchemeGuardChecks/3>::getAnIndirectBarrierNode() | ||
| } | ||
| } | ||
|
|
||
| module PotentiallyUnguardedProtocolHandlerFlow = | ||
| TaintTracking::Global<PotentiallyUnguardedProtocolHandlerConfig>; | ||
|
|
||
| import PotentiallyUnguardedProtocolHandlerFlow::PathGraph | ||
|
|
||
| from | ||
| PotentiallyUnguardedProtocolHandlerFlow::PathNode source, | ||
| PotentiallyUnguardedProtocolHandlerFlow::PathNode sink, FunctionCall call, string callType | ||
| where | ||
| PotentiallyUnguardedProtocolHandlerFlow::flowPath(source, sink) and | ||
| ( | ||
| call.getTarget().hasQualifiedName("", "QDesktopServices", "openUrl") and | ||
| sink.getNode().asConvertedExpr() = call.getArgument(0) and | ||
| callType = "QDesktopServices::openUrl()" | ||
| or | ||
| isShellProtocolHandlerCall(call, callType) and | ||
| sink.getNode().asIndirectExpr() = call.getArgument(0) | ||
| ) | ||
| select call, source, sink, | ||
| callType + " is called with untrusted input from $@ without URL scheme validation.", | ||
| source.getNode(), "this source" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,8 @@ | |
| extern "C" { | ||
| #endif | ||
|
|
||
| long read(int, void *, unsigned long); | ||
|
|
||
| void _exit(int); | ||
|
|
||
| #ifdef __cplusplus | ||
|
|
||
112 changes: 112 additions & 0 deletions
112
...ests/security/PotentiallyUnguardedProtocolHandler/PotentiallyUnguardedProtocolHandler.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| #include "../../../include/libc/stdlib.h" | ||
| #include "../../../include/libc/string_stubs.h" | ||
| #include "../../../include/libc/unistd.h" | ||
|
|
||
| struct QString { | ||
| QString(const char *value); | ||
| bool operator==(const char *other) const; | ||
| bool startsWith(const char *prefix) const; | ||
| }; | ||
|
|
||
| struct QUrl { | ||
| QUrl(const char *value); | ||
| QString scheme() const; | ||
| }; | ||
|
|
||
| struct QDesktopServices { | ||
| static bool openUrl(const QUrl &url); | ||
| }; | ||
|
|
||
| void bad_qt() { | ||
| char url[1024]; | ||
| read(0, url, sizeof(url)); | ||
| QDesktopServices::openUrl(QUrl(url)); // BAD | ||
| } | ||
|
|
||
| void good_qt_hardcoded() { | ||
| QDesktopServices::openUrl(QUrl("https://example.com")); // GOOD | ||
| } | ||
|
|
||
| void good_qt_prefix_check() { | ||
| char url[1024]; | ||
| read(0, url, sizeof(url)); | ||
| if (strncmp(url, "https://", 8) == 0) { | ||
| QDesktopServices::openUrl(QUrl(url)); // GOOD | ||
| } | ||
| } | ||
|
|
||
| void good_qt_reject_other_prefix() { | ||
| char url[1024]; | ||
| read(0, url, sizeof(url)); | ||
| if (strncmp(url, "https://", 8) != 0) { | ||
| return; | ||
| } | ||
| QDesktopServices::openUrl(QUrl(url)); // GOOD | ||
| } | ||
|
|
||
| void good_qt_scheme_check() { | ||
| char value[1024]; | ||
| read(0, value, sizeof(value)); | ||
| QUrl url(value); | ||
| if (url.scheme() == "https") { | ||
| QDesktopServices::openUrl(url); // GOOD | ||
| } | ||
| } | ||
|
|
||
| void bad_qt_file_scheme() { | ||
| char url[1024]; | ||
| read(0, url, sizeof(url)); | ||
| if (strncmp(url, "file://", 7) == 0) { | ||
| QDesktopServices::openUrl(QUrl(url)); // BAD | ||
| } | ||
| } | ||
|
|
||
| void bad_qt_partial_prefix() { | ||
| char url[1024]; | ||
| read(0, url, sizeof(url)); | ||
| if (strncmp(url, "https://", 4) == 0) { | ||
| QDesktopServices::openUrl(QUrl(url)); // BAD | ||
| } | ||
| } | ||
|
|
||
| void bad_qt_rejected_scheme() { | ||
| char url[1024]; | ||
| read(0, url, sizeof(url)); | ||
| if (strncmp(url, "https://", 8) != 0) { | ||
| QDesktopServices::openUrl(QUrl(url)); // BAD | ||
| } | ||
| } | ||
|
|
||
| void bad_shell() { | ||
| char url[1024]; | ||
| char command[2048]; | ||
| read(0, url, sizeof(url)); | ||
| sprintf(command, "xdg-open '%s'", url); | ||
| system(command); // BAD | ||
| } | ||
|
|
||
| void bad_shell_rundll() { | ||
| char url[1024]; | ||
| char command[2048]; | ||
| read(0, url, sizeof(url)); | ||
| sprintf(command, "rundll32 url.dll,FileProtocolHandler '%s'", url); | ||
| system(command); // BAD | ||
| } | ||
|
|
||
| void bad_shell_open() { | ||
| char url[1024]; | ||
| char command[2048]; | ||
| read(0, url, sizeof(url)); | ||
| sprintf(command, "open '%s'", url); | ||
| system(command); // BAD | ||
| } | ||
|
|
||
| void good_shell() { | ||
| char url[1024]; | ||
| char command[2048]; | ||
| read(0, url, sizeof(url)); | ||
| if (strncmp(url, "https://", 8) == 0) { | ||
| sprintf(command, "xdg-open '%s'", url); | ||
| system(command); // GOOD | ||
| } | ||
| } |
32 changes: 32 additions & 0 deletions
32
...security/PotentiallyUnguardedProtocolHandler/PotentiallyUnguardedProtocolHandler.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| edges | ||
| | PotentiallyUnguardedProtocolHandler.cpp:22:11:22:13 | read output argument | PotentiallyUnguardedProtocolHandler.cpp:23:29:23:37 | call to QUrl | provenance | TaintFunction | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:58:11:58:13 | read output argument | PotentiallyUnguardedProtocolHandler.cpp:60:31:60:39 | call to QUrl | provenance | TaintFunction | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:66:11:66:13 | read output argument | PotentiallyUnguardedProtocolHandler.cpp:68:31:68:39 | call to QUrl | provenance | TaintFunction | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:74:11:74:13 | read output argument | PotentiallyUnguardedProtocolHandler.cpp:76:31:76:39 | call to QUrl | provenance | TaintFunction | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:83:11:83:13 | read output argument | PotentiallyUnguardedProtocolHandler.cpp:85:10:85:16 | *command | provenance | TaintFunction | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:91:11:91:13 | read output argument | PotentiallyUnguardedProtocolHandler.cpp:93:10:93:16 | *command | provenance | TaintFunction | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:99:11:99:13 | read output argument | PotentiallyUnguardedProtocolHandler.cpp:101:10:101:16 | *command | provenance | TaintFunction | | ||
| nodes | ||
| | PotentiallyUnguardedProtocolHandler.cpp:22:11:22:13 | read output argument | semmle.label | read output argument | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:23:29:23:37 | call to QUrl | semmle.label | call to QUrl | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:58:11:58:13 | read output argument | semmle.label | read output argument | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:60:31:60:39 | call to QUrl | semmle.label | call to QUrl | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:66:11:66:13 | read output argument | semmle.label | read output argument | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:68:31:68:39 | call to QUrl | semmle.label | call to QUrl | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:74:11:74:13 | read output argument | semmle.label | read output argument | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:76:31:76:39 | call to QUrl | semmle.label | call to QUrl | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:83:11:83:13 | read output argument | semmle.label | read output argument | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:85:10:85:16 | *command | semmle.label | *command | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:91:11:91:13 | read output argument | semmle.label | read output argument | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:93:10:93:16 | *command | semmle.label | *command | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:99:11:99:13 | read output argument | semmle.label | read output argument | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:101:10:101:16 | *command | semmle.label | *command | | ||
| subpaths | ||
| #select | ||
| | PotentiallyUnguardedProtocolHandler.cpp:23:3:23:27 | call to openUrl | PotentiallyUnguardedProtocolHandler.cpp:22:11:22:13 | read output argument | PotentiallyUnguardedProtocolHandler.cpp:23:29:23:37 | call to QUrl | QDesktopServices::openUrl() is called with untrusted input from $@ without URL scheme validation. | PotentiallyUnguardedProtocolHandler.cpp:22:11:22:13 | read output argument | this source | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:60:5:60:29 | call to openUrl | PotentiallyUnguardedProtocolHandler.cpp:58:11:58:13 | read output argument | PotentiallyUnguardedProtocolHandler.cpp:60:31:60:39 | call to QUrl | QDesktopServices::openUrl() is called with untrusted input from $@ without URL scheme validation. | PotentiallyUnguardedProtocolHandler.cpp:58:11:58:13 | read output argument | this source | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:68:5:68:29 | call to openUrl | PotentiallyUnguardedProtocolHandler.cpp:66:11:66:13 | read output argument | PotentiallyUnguardedProtocolHandler.cpp:68:31:68:39 | call to QUrl | QDesktopServices::openUrl() is called with untrusted input from $@ without URL scheme validation. | PotentiallyUnguardedProtocolHandler.cpp:66:11:66:13 | read output argument | this source | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:76:5:76:29 | call to openUrl | PotentiallyUnguardedProtocolHandler.cpp:74:11:74:13 | read output argument | PotentiallyUnguardedProtocolHandler.cpp:76:31:76:39 | call to QUrl | QDesktopServices::openUrl() is called with untrusted input from $@ without URL scheme validation. | PotentiallyUnguardedProtocolHandler.cpp:74:11:74:13 | read output argument | this source | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:85:3:85:8 | call to system | PotentiallyUnguardedProtocolHandler.cpp:83:11:83:13 | read output argument | PotentiallyUnguardedProtocolHandler.cpp:85:10:85:16 | *command | xdg-open is called with untrusted input from $@ without URL scheme validation. | PotentiallyUnguardedProtocolHandler.cpp:83:11:83:13 | read output argument | this source | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:93:3:93:8 | call to system | PotentiallyUnguardedProtocolHandler.cpp:91:11:91:13 | read output argument | PotentiallyUnguardedProtocolHandler.cpp:93:10:93:16 | *command | rundll32 url.dll,FileProtocolHandler is called with untrusted input from $@ without URL scheme validation. | PotentiallyUnguardedProtocolHandler.cpp:91:11:91:13 | read output argument | this source | | ||
| | PotentiallyUnguardedProtocolHandler.cpp:101:3:101:8 | call to system | PotentiallyUnguardedProtocolHandler.cpp:99:11:99:13 | read output argument | PotentiallyUnguardedProtocolHandler.cpp:101:10:101:16 | *command | open is called with untrusted input from $@ without URL scheme validation. | PotentiallyUnguardedProtocolHandler.cpp:99:11:99:13 | read output argument | this source | | ||
1 change: 1 addition & 0 deletions
1
...ts/security/PotentiallyUnguardedProtocolHandler/PotentiallyUnguardedProtocolHandler.qlref
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| security/PotentiallyUnguardedProtocolHandler/PotentiallyUnguardedProtocolHandler.ql |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.