# CVE-2018-16476: Improper Access Control in activejob

> Attackers can exploit unsafe deserialization in Active Job to access unauthorized information via crafted GlobalId inputs.

- **Severity:** High 7.5 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 Nov 2018
- **Updated:** 5 Aug 2024
- **Also known as:** DEBIAN-CVE-2018-16476, GHSA-q2qw-rmrh-vv42, RHSA-2019:0600, SUSE-SU-2018:3996-1, SUSE-SU-2019:0152-1, UBUNTU-CVE-2018-16476

## What is CVE-2018-16476?

CVE-2018-16476 is a high-severity unsafe deserialization vulnerability in Rubyonrails Rails, published on 30 Nov 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A Broken Access Control vulnerability in Active Job versions >= 4.2.0 allows an attacker to craft user input which can cause Active Job to deserialize it using GlobalId and give them access to information that they should not have. This vulnerability has been fixed in versions 4.2.11, 5.0.7.1, 5.1.6.1, and 5.2.1.1.

Weakness: CWE-502 (Deserialization of Untrusted Data), CWE-284 (Improper Access Control)

## Which versions are affected by CVE-2018-16476?

8 open source packages ship an affected version, including activejob. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `activejob` | RubyGems | From 4.2.0 | 4.2.11 |
| `activejob` | RubyGems | From 4.2.0 | 4.2.11 |
| `activejob` | RubyGems | From 5.0.0 | 5.0.7.1 |
| `activejob` | RubyGems | From 5.0.0 | 5.0.7.1 |
| `activejob` | RubyGems | From 5.1.0 | 5.1.6.1 |
| `activejob` | RubyGems | From 5.1.0 | 5.1.6.1 |
| `activejob` | RubyGems | From 5.2.0 | 5.2.1.1 |
| `activejob` | RubyGems | From 5.2.0 | 5.2.1.1 |
| `cfme` | Red Hat:cloudforms_managementengine:5.9::el7 | All versions | 0:5.9.9.1-1.el7cf |
| `cfme-amazon-smartstate` | Red Hat:cloudforms_managementengine:5.9::el7 | All versions | 0:5.9.9.1-1.el7cf |
| `cfme-appliance` | Red Hat:cloudforms_managementengine:5.9::el7 | All versions | 0:5.9.9.1-1.el7cf |
| `cfme-appliance-common` | Red Hat:cloudforms_managementengine:5.9::el7 | All versions | 0:5.9.9.1-1.el7cf |
| `cfme-appliance-debuginfo` | Red Hat:cloudforms_managementengine:5.9::el7 | All versions | 0:5.9.9.1-1.el7cf |
| `cfme-appliance-tools` | Red Hat:cloudforms_managementengine:5.9::el7 | All versions | 0:5.9.9.1-1.el7cf |
| `cfme-debuginfo` | Red Hat:cloudforms_managementengine:5.9::el7 | All versions | 0:5.9.9.1-1.el7cf |
| `cfme-gemset` | Red Hat:cloudforms_managementengine:5.9::el7 | All versions | 0:5.9.9.1-1.el7cf |
| `cfme-gemset-debuginfo` | Red Hat:cloudforms_managementengine:5.9::el7 | All versions | 0:5.9.9.1-1.el7cf |
| `rubygem-activejob-4_2` | SUSE:Enterprise Storage 4 | All versions | 4.2.9-3.6.1 |
| `rubygem-activejob-5_1` | SUSE:Linux Enterprise High Availability Extension 15 | All versions | 5.1.4-3.3.1 |
| `rubygem-activejob-4_2` | SUSE:OpenStack Cloud 7 | All versions | 4.2.9-3.6.1 |
| `rubygem-activejob-4_2` | SUSE:OpenStack Cloud Crowbar 8 | All versions | 4.2.9-3.6.1 |

Products: Redhat Cloudforms, Rubyonrails Rails.

## How do I fix CVE-2018-16476?

Upgrade activejob to a fixed version for your release line: 4.2.11, 5.0.7.1, 5.1.6.1 or 5.2.1.1.

## Is CVE-2018-16476 being exploited?

There is no known exploitation of CVE-2018-16476 in the wild and no public exploit code.

## Other vulnerabilities in Rubyonrails Rails

- [CVE-2020-14325](https://insights.sbomify.com/CVE-2020-14325/): Auth bypass in CloudForms (critical 9.1)
- [CVE-2014-0197](https://insights.sbomify.com/CVE-2014-0197/): Cross-site request forgery in CFME (high 8.8)
- [CVE-2016-5402](https://insights.sbomify.com/CVE-2016-5402/): Code injection in cfme (high 8.8)
- [CVE-2016-7071](https://insights.sbomify.com/CVE-2016-7071/): Missing authorization in CFME (high 8.8)
- [CVE-2017-7530](https://insights.sbomify.com/CVE-2017-7530/): Missing authorization in cfme (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-16476 and fix it if it is affected.

What it is: CVE-2018-16476 is a high-severity unsafe deserialization vulnerability in Rubyonrails Rails, published on 30 Nov 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2018-16476 in the wild and no public exploit code.

Affected packages and fixed versions:
- activejob (RubyGems): affected from 4.2.0; fixed in 4.2.11
- activejob (RubyGems): affected from 4.2.0; fixed in 4.2.11
- activejob (RubyGems): affected from 5.0.0; fixed in 5.0.7.1
- activejob (RubyGems): affected from 5.0.0; fixed in 5.0.7.1
- activejob (RubyGems): affected from 5.1.0; fixed in 5.1.6.1
- activejob (RubyGems): affected from 5.1.0; fixed in 5.1.6.1
- activejob (RubyGems): affected from 5.2.0; fixed in 5.2.1.1
- activejob (RubyGems): affected from 5.2.0; fixed in 5.2.1.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2018-16476/ (Markdown: https://insights.sbomify.com/CVE-2018-16476/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2018-16476
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2018-16476
- OSV: https://osv.dev/vulnerability/CVE-2018-16476

---
From sbomify Insights: https://insights.sbomify.com/CVE-2018-16476/
Summaries are generated and may contain mistakes; the official description above is the record.
