Discussion:
[CVE-2018-16476] Broken Access Control vulnerability in Active Job
(too old to reply)
Rafael Mendonça França
2018-11-27 21:06:36 UTC
Permalink
There is a vulnerability in Active Job. This vulnerability has been
assigned the CVE identifier CVE-2018-16476.

Versions Affected: >= 4.2.0
Not affected: < 4.2.0
Fixed Versions: 4.2.11, 5.0.7.1, 5.1.6.1, 5.2.1.1

Impact
------
Carefully crafted user input can cause Active Job to deserialize it using GlobalId
and allow an attacker to have access to information that they should not have.

Vulnerable code will look something like this:

    MyJob.perform_later(user_input)

All users running an affected release should either upgrade or use one of the
workarounds immediately.

Releases
--------
The FIXED releases are available at the normal locations.

Workarounds
-----------
Putting the following monkey patch in an intializer can help to mitigate the issue:

```
require 'active_job'
require 'active_job/arguments'

module ArgumentsNotDeserializingGlobalId
  def deserialize_argument(argument)
    case argument
    when String
      argument
    else
      super
    end
  end
end

ActiveJob::Arguments.singleton_class.prepend(ArgumentsNotDeserializingGlobalId)
```

Patches
-------
To aid users who aren't able to upgrade immediately we have provided patches for
the two supported release series. They are in git-am format and consist of a
single changeset.

* 4-2-activejob-direct-access.patch - Patch for 4.2 series
* 5-0-activejob-direct-access.patch - Patch for 5.0 series
* 5-1-activejob-direct-access.patch - Patch for 5.1 series
* 5-2-activejob-direct-access.patch - Patch for 5.2 series

Please note that only the 5.x and 4.2.x series are supported at present. Users
of earlier unsupported releases are advised to upgrade as soon as possible as we
cannot guarantee the continued availability of security fixes for unsupported
releases.

Rafael França

Loading...