swagger-api / swagger-api/swagger-codegen

CVE-2022-29970 (High) detected in sinatra-1.4.6.gem

Open
#11,867 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

security vulnerability
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

CVE-2022-29970 - High Severity Vulnerability

Vulnerable Library - sinatra-1.4.6.gem

Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort.

Library home page: https://rubygems.org/gems/sinatra-1.4.6.gem

Dependency Hierarchy:

  • sinatra-1.4.6.gem (Vulnerable Library)

Found in HEAD commit: 4b7a8d7d7384aa6a27d6309c35ade0916edae7ed

Found in base branch: master

Vulnerability Details

Sinatra before 2.2.0 does not validate that the expanded path matches public_dir when serving static files.

Publish Date: 2022-05-02

URL: CVE-2022-29970

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: High
    • Integrity Impact: None
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://github.com/advisories/GHSA-qp49-3pvw-x4m5

Release Date: 2022-05-02

Fix Resolution: sinatra - 2.2.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the dependency state recorded in HEAD commit 4b7a8d7d7384aa6a27d6309c35ade0916edae7ed and compare it with the master branch. Upgrade sinatra from 1.4.6 to 2.2.0, then verify that the project remains functional and no vulnerable 1.4.6 dependency remains.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.