graphite-project / carbon

Audit required: Use of pickle module BAN-B301
Security
Major
4 years ago4 years old
Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue.
307    self.response = None
308    if arg:
309      raw_response = arg
310      self.response = pickle.loads(raw_response)311
312  def send_request(self, request_type, **kwargs):
313    request = {}
Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue.
236
237    @classmethod
238    def loads(cls, pickle_string):
239      pickle_obj = pickle.Unpickler(StringIO(pickle_string))240      pickle_obj.find_global = cls.find_class
241      return pickle_obj.load()
242
Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue.
 25
 26def decode_sent(data):
 27  pickle_size = unpack(INT32_FORMAT, data[:INT32_SIZE])[0]
 28  return pickle_loads(data[INT32_SIZE:INT32_SIZE + pickle_size]) 29
 30
 31class BroadcastRouter(DatapointRouter):