Loading...
Skip to main content

CVE-2019-16676 — Improper Input Validation in simple_form — CVE...

CRITICAL

Improper Input Validation in simple_form

Published September 30, 2019Updated August 27, 2026Source: osv

Summary

## Incorrect Access Control in `file_method?` in `lib/simple_form/form_builder.rb`; a user-supplied string is invoked as a method call ### Impact For pages that build a form using user input, it is possible for an attacker to manipulate the input and send any method present in the form object. For example: ```erb <%= simple_form_for @user do |f| %> <%= f.label @user_supplied_string %> ... <% end %> ``` The string provided in the variable `@user_supplied_string` would be invoked as a method call inside the `@user` object (unless the string contains any of the following: `password`, `time_zone`, `country`, `email`, `phone` and `url`). By manipulation that input, an attacker could do any of the following: - Code execution (call actions like `#destroy`) - Denial of Service (by executing a computation intensive method) - Information Disclosure (check the presence of methods, leak user information) ### Patches The problem was fixed in version `5.0`. Although it's a major version, there should be no issues with upgrading for `4.x`. The reason it was released in a major version is that the configuration `SimpleForm.file_methods` was deprecated in order to fix the problem. ### Workarounds The issue only happens with pages that build forms based on user-provided input. If your application doesn't do that, you're not affected. A workaround is to explicitly pass which type you want for an input since the issue lies on Simple Form's automatically discovery of input types. This can be done using the `as` option, like the following: ```erb <%= form.input :avatar, as: :file %> ``` ### References [TDB] ### For more information If you have any questions or comments about this advisory: * Open an issue in [https://github.com/plataformatec/simple_form](https://github.com/plataformatec/simple_form) * Email us at [opensource@plataformatec.com.br](mailto:opensource@plataformatec.com.br)

Advisory Timeline

  • First published September 30, 2019 (2569 days ago).
  • Last revised August 27, 2026 — 2522 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update simple_form to 5.0.0 or later
gem install simple_form -v 5.0.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
simple_form
rubygems
0.4.0, 0.5, 1.0.0, 1.0.1 (+49 more)5.0.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-20
    Improper Input ValidationMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.8 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2019-16676?
Improper Input Validation in simple_form This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.8/10).
How do I check if my project is affected by CVE-2019-16676?
CVE-2019-16676 affects simple_form. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2019-16676 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.8

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-r74q-gxcg-73hx

Related CVEs

  • CVE-2026-55107
    CRITICAL

    kobako Sandbox Escape: guest eval reaches host RCE via method_missing → public_send (any bound Service)

  • CVE-2026-77602
    CRITICAL

    OpenC3 COSMOS: Authenticated remote code execution via the user-writable config overlay (table definitions, cmd/tlm definitions, and script suites)

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies