CVE-2019-18848: Json jwt JSON-jwt Gem Lacked Element Count Vulnerability

HIGH
Advisory Identifier: GHSA-cff7-6h4q-q5pj
CVSS 7.5
CWE-287
Published
Advisory Summary

CVE-2019-18848 is a HIGH (CVSS 7.5) json-jwt gem lacked element count vulnerability (CWE-287: Improper Authentication) affecting Json jwt libraries in the RubyGems ecosystem. The issue involves json-jwt gem lacked element count during splitting of jwe string. Remediation is available by upgrading affected packages to version 1.11.0.

CVE-2019-18848 at a Glance

CVE Identifier CVE-2019-18848
GHSA Identifier GHSA-cff7-6h4q-q5pj
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-287: Improper Authentication
Affected Product Json jwt
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

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

How to Fix CVE-2019-18848

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

json-jwt fixed: 1.11.0
Upgrade json-jwt to 1.11.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 json-jwt

How to Check if You Are Affected

To determine whether your application is affected by CVE-2019-18848, inspect your project dependencies for Json jwt:

inspect dependencies for json-jwt

Analyze the terminal output to locate any version of Json jwt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.11.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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Json jwt, 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

The json-jwt gem before 1.11.0 for Ruby lacks an element count during the splitting of a JWE string.

CVE-2019-18848 Affected Json jwt Versions

1 component(s)
Fixed Versions:
1.11.0
Product / Package Ecosystem Affected Versions Fixed Version
json-jwt
RubyGems
< 1.11.0
1.11.0

References

Frequently Asked Questions

What is CVE-2019-18848?
CVE-2019-18848 is a security vulnerability in Json jwt involving JSON-jwt Gem lacked element count during splitting of JWE string under CWE-287: Improper Authentication.
Which Json jwt versions are affected?
Affected versions include releases prior to 1.11.0 across affected packages: json-jwt.
What version fixes CVE-2019-18848?
Upgrading to 1.11.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is json-jwt affected?
Yes, json-jwt is affected in releases prior to 1.11.0. Upgrade your dependency to 1.11.0 or later.
What is the CVSS score of CVE-2019-18848?
CVE-2019-18848 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2019-18848?
CVE-2019-18848 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check RubyGems dependencies for CVE-2019-18848?
Run the dependency tree command: 'inspect dependencies for json-jwt'. 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-cff7-6h4q-q5pj",
  "modified" : "2023-08-25T23:33:30Z",
  "published" : "2019-11-14T15:25:51Z",
  "aliases" : [ "CVE-2019-18848" ],
  "summary" : "JSON-jwt Gem lacked element count during splitting of JWE string",
  "details" : "The json-jwt gem before 1.11.0 for Ruby lacks an element count during the splitting of a JWE string.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "json-jwt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.11.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-18848"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nov/json-jwt/commit/ada16e772906efdd035e3df49cb2ae372f0f948a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nov/json-jwt"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nov/json-jwt/compare/v1.10.2...v1.11.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/json-jwt/CVE-2019-18848.yml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2020/10/msg00001.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-11-14T15:24:51Z",
    "nvd_published_at" : "2019-11-12T15:15:00Z"
  }
}