Giter Site home page Giter Site logo

Comments (4)

maxrossello avatar maxrossello commented on September 2, 2024

Would love to receive an example of parameters that can be used for an attack, and possibly a patch to merge.
Thank you!

from redmine_watcher_groups.

thegcat avatar thegcat commented on September 2, 2024

In WatcherGroupsController#create, ["watcher_group"]["group_ids"] is not sanitized before being passed to the raw SQL string, so passing on ; something as ["watcher_group"]["group_ids"] to WatcherGroupsController#create will result in:

   (0.2ms)  INSERT INTO `watchers` (`user_id`, `watchable_id`, `watchable_type`) VALUES (; something, 9, 'Issue')
Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; something, 9, 'Issue')' at line 1: 
INSERT INTO `watchers` (`user_id`, `watchable_id`, `watchable_type`) VALUES (; something, 9, 'Issue')

This will obviously only crash the request, as you can pass arbitrary SQL to the database though this basically would allow an attacker to completely take over the Redmine data.

from redmine_watcher_groups.

thegcat avatar thegcat commented on September 2, 2024

See #10 for a minimal fix.

from redmine_watcher_groups.

maxrossello avatar maxrossello commented on September 2, 2024

Fixed on my branch, please look at https://github.com/maxrossello/redmine_watcher_groups.
Thank you

from redmine_watcher_groups.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.