The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-3285

CVE-2026-3285: Berry-lang Berry Buffer Overflow Vulnerability

CVE-2026-3285 is a buffer overflow vulnerability in Berry-lang Berry up to version 1.1.0 affecting the scan_string function. This article covers technical details, affected versions, security impact, and mitigation.

Published: March 6, 2026

CVE-2026-3285 Overview

A vulnerability has been identified in berry-lang berry up to version 1.1.0. The affected element is the function scan_string in the file src/be_lexer.c. This manipulation causes an out-of-bounds read condition. The attack requires local access to the system. The exploit has been publicly disclosed and may be utilized. The vulnerability exists in the string scanning functionality of the Berry language interpreter's lexer component.

Critical Impact

An attacker with local access can trigger an out-of-bounds read in the lexer, potentially leading to information disclosure or application crashes when processing maliciously crafted Berry language scripts.

Affected Products

  • berry-lang berry version 1.1.0 and earlier
  • Berry language interpreter with vulnerable src/be_lexer.c implementation
  • Systems running Berry scripts without the security patch applied

Discovery Timeline

  • 2026-02-27 - CVE CVE-2026-3285 published to NVD
  • 2026-03-02 - Last updated in NVD database

Technical Details for CVE-2026-3285

Vulnerability Analysis

This vulnerability is an out-of-bounds read (CWE-125) that occurs within the scan_string function located in src/be_lexer.c. The root issue stems from improper memory safety checks when processing escape sequences in string literals. When the lexer encounters a backslash character within a string, it attempts to read the next character without first verifying that the input hasn't reached the end of the stream (EOS). This can result in reading memory beyond the allocated buffer boundaries, classified under CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer).

The vulnerability requires local access to exploit, meaning an attacker must be able to provide malicious input to the Berry interpreter. This could occur through crafted Berry script files or string inputs processed by the interpreter.

Root Cause

The root cause of this vulnerability is missing boundary validation in the escape sequence handling within the scan_string function. When the lexer processes a string literal and encounters a backslash (\\), it immediately attempts to read the following character without checking if the end of the input stream has been reached. This oversight allows the lexer to read beyond the allocated buffer when processing a string that ends with an unfinished escape sequence.

Attack Vector

The attack vector is local, requiring an attacker to have the ability to provide input to the Berry language interpreter. Exploitation involves:

  1. Creating a malformed Berry script containing a string literal with an incomplete escape sequence at the end
  2. Having the vulnerable Berry interpreter parse this malicious input
  3. The lexer reads beyond buffer boundaries when processing the escape character

The following patch from commit 7149c59a39ba44feca261b12f06089f265fec176 addresses the vulnerability:

c
         while ((c = lgetc(lexer)) != EOS && (c != end)) {
             save(lexer);
             if (c == '\\') {
+                if (lgetc(lexer) == EOS) { c = EOS; break; }
                 save(lexer); /* skip '\\.' */
             }
         }

Source: GitHub Commit Details

The patch adds a critical check to verify that the end of stream hasn't been reached after reading a backslash character, breaking out of the loop safely if EOS is detected.

Detection Methods for CVE-2026-3285

Indicators of Compromise

  • Unexpected crashes or segmentation faults in Berry interpreter processes
  • Memory access violation errors in system logs related to Berry language execution
  • Anomalous behavior when parsing Berry scripts containing unusual escape sequences

Detection Strategies

  • Monitor Berry interpreter processes for unexpected termination or memory access violations
  • Implement input validation to detect malformed string literals before processing
  • Use address sanitizer tools (ASan) during development and testing to identify out-of-bounds reads

Monitoring Recommendations

  • Enable logging for Berry interpreter execution to track script processing errors
  • Deploy memory safety monitoring tools in environments running Berry language scripts
  • Review system logs for segmentation fault patterns associated with lexer operations

How to Mitigate CVE-2026-3285

Immediate Actions Required

  • Update berry-lang berry to a version containing patch 7149c59a39ba44feca261b12f06089f265fec176
  • Review and audit any Berry scripts from untrusted sources before execution
  • Restrict local access to systems running Berry interpreter to trusted users only

Patch Information

A security patch has been released by berry-lang. The fix is available in commit 7149c59a39ba44feca261b12f06089f265fec176. The patch adds proper end-of-stream validation when processing escape sequences in string literals, preventing the out-of-bounds read condition. For detailed patch information, see the GitHub Commit Details and related GitHub Pull Request.

Workarounds

  • Restrict execution of Berry scripts to trusted sources only until the patch can be applied
  • Implement input sanitization to filter out potentially malicious string patterns before parsing
  • Run Berry interpreter processes in sandboxed environments to limit impact of potential exploitation
bash
# Apply the security patch from the official repository
cd /path/to/berry
git fetch origin
git cherry-pick 7149c59a39ba44feca261b12f06089f265fec176
make clean && make

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechBerry Lang

  • SeverityLOW

  • CVSS Score1.9

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-119

  • CWE-125
  • Technical References
  • GitHub Repository

  • GitHub Issue Tracker

  • GitHub Pull Request

  • GitHub Reproducible Example

  • VulDB Ctiid #348014

  • VulDB #348014

  • VulDB Submission #758872
  • Vendor Resources
  • GitHub Commit Details
  • Latest CVEs
  • CVE-2025-70797: LimeSurvey XSS Vulnerability

  • CVE-2025-30650: Juniper Junos OS Auth Bypass Vulnerability

  • CVE-2026-35471: Goshs Path Traversal Vulnerability

  • CVE-2026-35393: Goshs Path Traversal Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English