Conversation
… Dart, Perl, Lua 188 sinks across the next tier of languages. C# gets the .NET deserialization surface (BinaryFormatter, LosFormatter, NetDataContractSerializer, JavaScriptSerializer with TypeResolver) plus XXE, SQL injection via SqlCommand, Assembly.Load. C and C++ get the classic buffer overflow functions (gets, strcpy, sprintf, scanf %s), format string sinks (printf with caller format), and the tmpnam/mktemp TOCTOU race. Elixir gets Code.eval_string, the :os.cmd/:erlang interop surface, atom exhaustion via String.to_atom, and :erlang.binary_to_term without :safe. Kotlin and Scala inherit Java's JVM surface but get their own language-specific entry points (scala.sys.process string-to-process implicit, kotlin.io.path). Swift gets NSKeyedUnarchiver deserialization, NSPredicate/NSExpression injection, WKWebView.loadHTMLString XSS, and XMLParser XXE. Perl gets the two-arg open and | pipe injection. Lua gets loadstring/load and the debug library that should be disabled in sandboxes. 17 of 53 language defs now carry sinks, covering the ecosystems where projects actually appear in practice. Closes #29
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
188 sinks across the next tier of 11 languages, building on the six from #24.
C# (36) gets the .NET deserialization surface (BinaryFormatter, LosFormatter, NetDataContractSerializer, JavaScriptSerializer with TypeResolver), XXE via XmlDocument/XmlTextReader, SqlCommand injection, and Assembly.Load/Activator.CreateInstance reflection. C (27) and C++ (17) get buffer overflow classics (gets, strcpy, sprintf, scanf %s), format string sinks (printf with caller format), tmpnam/mktemp TOCTOU, and the memory misuse patterns (double-free, unchecked alloca). Elixir (17) gets Code.eval_string, :os.cmd/:erlang interop, atom exhaustion via String.to_atom, and :erlang.binary_to_term without :safe. Kotlin (12) and Scala (11) inherit JVM surface with language-specific entry points (Scala's string-to-process implicit .!, Kotlin's kotlin.io.path). Swift (16) gets NSKeyedUnarchiver deserialization, NSPredicate/NSExpression injection, WKWebView XSS, and XMLParser XXE. Perl (15) gets two-arg open with | pipe injection and Storable::thaw deserialization. Lua (11) gets loadstring/load and notes that the debug library should be disabled in sandboxes. Rust (13) is mostly unsafe pointer operations plus Command::new.
17 of 53 language defs now carry sinks, covering the ecosystems where projects actually appear in practice. The remaining 36 (Ada, COBOL, Gleam, Roc, etc) are left for later.
Closes #29