CWE
20
Advisory Published
Advisory Published
Updated

CVE-2019-16676: Input Validation

First published: Mon Sep 30 2019(Updated: )

## 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)

Credit: cve@mitre.org cve@mitre.org

Affected SoftwareAffected VersionHow to fix
rubygems/simple_form<5.0.0
5.0.0
Plataformatec Simple Form<5.0

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is CVE-2019-16676?

    CVE-2019-16676 is a vulnerability in Plataformatec Simple Form that allows an attacker to manipulate user input and invoke any method present in the form object.

  • How does CVE-2019-16676 impact websites?

    CVE-2019-16676 allows an attacker to manipulate form input and potentially perform unauthorized actions on a website.

  • Which software versions are affected by CVE-2019-16676?

    CVE-2019-16676 affects Plataformatec Simple Form up to version 5.0.0.

  • What is the severity of CVE-2019-16676?

    CVE-2019-16676 has a severity rating of 9.8, which is classified as critical.

  • How can I fix the CVE-2019-16676 vulnerability?

    To fix the CVE-2019-16676 vulnerability, update Plataformatec Simple Form to version 5.0.0 or above.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203