CVE-2026-2240

janet-lang janet compile.c janetc_pop_funcdef out-of-bounds

Published Feb 9, 2026 CVSS 4.0 · 4.8 Medium EPSS < 1% KEV · Not listed
Description
A vulnerability has been found in janet-lang janet up to 1.40.1. The impacted element is the function janetc_pop_funcdef of the file src/core/compile.c. Such manipulation leads to out-of-bounds read. The attack must be carried out locally. The exploit has been disclosed to the public and may be used. The name of the patch is 4dd08a4cdef5b1c42d9a2c19fc24412e97ef51d5. A patch should be applied to remediate this issue.

Analysis

AI-generated

Technical impact

A flaw in the Janet compiler’s janetc_pop_funcdef routine allows an out‑of‑bounds read, exposing memory contents in the process. The vulnerability is a typical buffer overread type (CWE‑119, CWE‑125) that can leak sensitive data without modifying it. The attack requires local privilege and does not directly trigger code execution or denial of service.

Affected Systems

Janet-lang’s Janet interpreter, versions up to 1.40.1, including the 1.40.x releases and any builds that incorporate the unpatched commit. The issue resides in src/core/compile.c and has been fixed by commit 4dd08a4cdef5b1c42d9a2c19fc24412e97ef51d5.

Risk and Exploitability

The CVSS score of 4.8 indicates low‑medium severity, and the EPSS score of less than 1% suggests a very low probability of exploitation in the wild. The vulnerability is not listed in CISA’s KEV catalog. Because the exploit requires local execution, it is unlikely to be leveraged remotely, but it remains a concern for environments where untrusted code may run under local privileges.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Janet to a version that includes commit 4dd08a4cdef5b1c42d9a2c19fc24412e97ef51d5 or newer.
  • If building from source, apply the patch from the referenced commit directly to the repository.
  • Limit the execution of Janet scripts to trusted users and consider adding filesystem access controls to minimize the impact of local exploitation.

Generated by OpenCVE AI on April 17, 2026 at 21:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:janet-lang:janet:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Janet-lang
Janet-lang janet
Vendors & Products Janet-lang
Janet-lang janet
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description A vulnerability has been found in janet-lang janet up to 1.40.1. The impacted element is the function janetc_pop_funcdef of the file src/core/compile.c. Such manipulation leads to out-of-bounds read. The attack must be carried out locally. The exploit has been disclosed to the public and may be used. The name of the patch is 4dd08a4cdef5b1c42d9a2c19fc24412e97ef51d5. A patch should be applied to remediate this issue.
Title janet-lang janet compile.c janetc_pop_funcdef out-of-bounds
Weaknesses CWE-119
CWE-125
References
Metrics cvssV2_0

{'score': 1.7, 'vector': 'AV:L/AC:L/Au:S/C:N/I:N/A:P/E:POC/RL:OF/RC:C'}

cvssV3_0

{'score': 3.3, 'vector': 'CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C'}

cvssV3_1

{'score': 3.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C'}

cvssV4_0

{'score': 4.8, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P'}

Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

  • CWE-125

    Out-of-bounds Read

Sources

Status
PUBLISHED
Assigner
VulDB
Published
Updated
Feb 23, 2026, 10:00 AM
Reserved
Feb 9, 2026, 9:38 AM
Status
Analyzed
Published
Feb 9, 2026, 4:16 PM
Modified
Jun 17, 2026, 10:30 AM