Skip to content
Heist/ feed
Back to feed
HighFix available

emacs — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2022-48338

An issue was discovered in GNU Emacs through 28.2. In ruby-mode.el, the ruby-find-library-file function has a local command injection vulnerability. The ruby-find-library-file function is an interactive function, and bound to C-c C-f. Inside the function, the external command gem is called through shell-command-to-string, but the feature-name parameters are not escaped. Thus, malicious Ruby source files may cause commands to be executed.

Products
emacs
Affected versions
Not specified
Fixed versions
1:28.2+1-11
CVEs
CVE-2022-48338
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 14:53 UTC · Revision 1

Source evidence

DEBIAN-CVE-2022-48338

core-osv · Original source

Published 20 Feb 2023, 23:15 UTC

An issue was discovered in GNU Emacs through 28.2. In ruby-mode.el, the ruby-find-library-file function has a local command injection vulnerability. The ruby-find-library-file function is an interactive function, and bound to C-c C-f. Inside the function, the external command gem is called through shell-command-to-string, but the feature-name parameters are not escaped. Thus, malicious Ruby source files may cause commands to be executed.

osv:DEBIAN-CVE-2022-48338

emacs

Fixed versions: 1:28.2+1-11

emacs

Fixed versions: 1:28.2+1-11

emacs

Fixed versions: 1:28.2+1-11

Complete source record
{
  "id": "3f7eea7fbab2655444b78cf1f8044f7ae04cc1b4344ff4ab2dc16c0c61b6a75e",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2022-48338",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2022-48338",
    "summary": "An issue was discovered in GNU Emacs through 28.2. In ruby-mode.el, the ruby-find-library-file function has a local command injection vulnerability. The ruby-find-library-file function is an interactive function, and bound to C-c C-f. Inside the function, the external command gem is called through shell-command-to-string, but the feature-name parameters are not escaped. Thus, malicious Ruby source files may cause commands to be executed.",
    "evidence": "osv:DEBIAN-CVE-2022-48338",
    "products": [
      {
        "name": {
          "value": "emacs",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1:28.2+1-11",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "emacs",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1:28.2+1-11",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "emacs",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1:28.2+1-11",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "DEBIAN-CVE-2022-48338",
      "aliases": [
        "DEBIAN-CVE-2022-48338"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1:28.2+1-11"
                }
              ]
            }
          ],
          "package": {
            "name": "emacs",
            "purl": "pkg:deb/debian/emacs?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-48338.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1:28.2+1-11"
                }
              ]
            }
          ],
          "package": {
            "name": "emacs",
            "purl": "pkg:deb/debian/emacs?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-48338.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1:28.2+1-11"
                }
              ]
            }
          ],
          "package": {
            "name": "emacs",
            "purl": "pkg:deb/debian/emacs?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-48338.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-15T08:02:33.570454227Z",
      "provider": "osv",
      "upstream": [
        "CVE-2022-48338"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2022-48338"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2022-48338",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 323608,
  "published_at": "2023-02-20T23:15:12.297+00:00"
}