CVE-2015-10096 (published 2023-03-20T05:15Z)

A vulnerability, which was classified as critical, was found in Zarthus IRC Twitter Announcer Bot up to 1.1.0. This affects the function get_tweets of the file lib/twitterbot/plugins/twitter_announcer.rb. The manipulation of the argument tweet leads to command injection. It is possible to initiate the attack remotely. The complexity of an attack is rather high. The exploitability is told to be difficult. Upgrading to version 1.1.1 is able to address this issue. The patch is named 6b1941b7fc2c70e1f40981b43c84a2c20cc12bd3. It is recommended to upgrade the affected component. The associated identifier of this vulnerability is VDB-223383.

CVSS v3 base score: 8.1, HIGH (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H)

Weakness information:
cwe_id: CWE-77
cwe_name: Improper Neutralization of Special Elements used in a Command ('Command Injection')
description: The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
extended_description: 
            Many protocols and products have their own custom command language. While OS or shell command strings are frequently discovered and targeted, developers may not realize that these other command languages might also be vulnerable to attacks.
         
         

Fix information:
repo_url: https://github.com/Zarthus/irc-twitter-bot
commit_details: repo_url: https://github.com/Zarthus/irc-twitter-bot
author: Jos Ahrens
author_date: 2015-08-13 02:29:13+02:00
msg: Prevent edge-case exploitation that allows execution of arbitrary fantasy commands.

This commit replaces \r\n with '.  ' in tweets.

An edge-case issue where you may be able to exploit the bot having op.
Should you be the one being tracked, you could insert a newline in your tweet, and follow it up for "!ban <someone>" to execute a fantasy command.

This exploit requires a lot of requirements to be met. Mainly the fact that the bot has permissions in the channel, and that the followed person is associated and aware of the possibility.
repository: repo_url: https://github.com/Zarthus/irc-twitter-bot
repo_name: Zarthus/irc-twitter-bot
description: Announces recent tweets to the channel
repo_language: Ruby
owner: Zarthus
file_changes: filename: twitter_announcer.rb
change_type: ModificationType.MODIFY
diff: @@ -152,8 +152,9 @@ module TwitterBot
         begin
           @twitter.user_timeline(account, count: amount).each do |tweet|
             name = tweet.user.screen_name
+            twtext = tweet.text.gsub("\r?\n", '.  ')
 
-            tweets << { account: name, tweet: tweet.text, time: tweet.created_at, uri: tweet.uri.to_s, id: tweet.id }
+            tweets << { account: name, tweet: twtext, time: tweet.created_at, uri: tweet.uri.to_s, id: tweet.id }
           end
         rescue StandardError => e
           warn "Unable to retrieve Tweet information for #{account}: #{e}"

programming_language: Ruby
filename: version.rb
change_type: ModificationType.MODIFY
diff: @@ -1,7 +1,7 @@
 module TwitterBot
   VERSION_MAJOR = 1
   VERSION_MINOR = 1
-  VERSION_BUILD = 0
+  VERSION_BUILD = 1
   VERSION_APPEND = ''
 
   VERSION = "#{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_BUILD}#{VERSION_APPEND}".freeze

programming_language: Ruby