Vulnerabilities in pkg:gem/narou

PACKAGE
Advisory Identifier: GHSA-gwrj-88fp-5m36
Advisory Summary

CVE-2021-35514 is a HIGH (CVSS 8.5) code injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Narou libraries in the RubyGems ecosystem. The issue involves code injection in narou. Remediation is available by upgrading affected packages to version 3.8.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/narou

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:gem/narou. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-gwrj-88fp-5m36 CVE-2021-35514 HIGH Code injection in Narou

CVE-2021-35514 at a Glance

CVE Identifier CVE-2021-35514
GHSA Identifier GHSA-gwrj-88fp-5m36
Severity HIGH
CVSS v3.1 Base Score 8.5
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Narou
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 8.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2021-35514

To remediate this vulnerability, upgrade all affected Narou dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

narou fixed: 3.8.0
Upgrade narou to 3.8.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for narou

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-35514, inspect your project dependencies for Narou:

inspect dependencies for narou

Analyze the terminal output to locate any version of Narou in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.8.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Narou, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Narou (aka Narou.rb) before 3.8.0 allows Ruby Code Injection via the title name or author name of a novel.

CVE-2021-35514 Affected Narou Versions

1 component(s)
Fixed Versions:
3.8.0
Product / Package Ecosystem Affected Versions Fixed Version
narou
RubyGems
< 3.8.0
3.8.0

References

Frequently Asked Questions

What is CVE-2021-35514?
CVE-2021-35514 is a security vulnerability in Narou involving Code injection in Narou under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Narou versions are affected?
Affected versions include releases prior to 3.8.0 across affected packages: narou.
What version fixes CVE-2021-35514?
Upgrading to 3.8.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is narou affected?
Yes, narou is affected in releases prior to 3.8.0. Upgrade your dependency to 3.8.0 or later.
What is the CVSS score of CVE-2021-35514?
CVE-2021-35514 has a CVSS v3.1 base score of 8.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N.
What CWE is associated with CVE-2021-35514?
CVE-2021-35514 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check RubyGems dependencies for CVE-2021-35514?
Run the dependency tree command: 'inspect dependencies for narou'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gwrj-88fp-5m36",
  "modified" : "2023-01-24T15:09:14Z",
  "published" : "2021-07-02T18:36:01Z",
  "aliases" : [ "CVE-2021-35514" ],
  "summary" : "Code injection in Narou",
  "details" : "Narou (aka Narou.rb) before 3.8.0 allows Ruby Code Injection via the title name or author name of a novel.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "narou"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.8.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-35514"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/whiteleaf7/narou/commit/d07720e855293182563b749431dfbf6c2d1cdb42"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/whiteleaf7/narou"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/whiteleaf7/narou/blob/develop/ChangeLog.md#380-20210627"
  }, {
    "type" : "WEB",
    "url" : "https://vuln.ryotak.me/advisories/51"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-06-30T17:42:19Z",
    "nvd_published_at" : "2021-06-28T12:15:00Z"
  }
}