Cloudanix VulnDB

CVE-2022-43358

High · 7.5

CVSS

7.5

EPSS

1.5%

Published

Aug 22, 2023

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in a tool that processes website styling code can let attackers crash applications or websites by sending specially crafted styling instructions.

Exploit Available
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Stack-based buffer overflow in Sass::ComplexSelector::has_placeholder within ast_selectors.cpp of libsass, triggered during parsing of complex selectors containing placeholders, resulting in denial of service via process crash.

Why it matters to the business

Applications or build pipelines relying on libsass for CSS/Sass processing can be crashed remotely or via local files, leading to service outages, interrupted deployments, and potential resource exhaustion in affected environments.

How an attack unfolds

An attacker supplies a specially crafted Sass file or input containing a malformed complex selector designed to overflow the stack during placeholder checks in has_placeholder; with public exploits available, this can be delivered via web uploads, build systems, or direct library calls to induce crashes without authentication.

How to fix it

Upgrade libsass to a version containing a fix for the stack overflow in has_placeholder once released; in the interim, implement input validation and sanitization on Sass/CSS content before processing, or switch to alternative Sass compilers such as Dart Sass that are not affected.

How to confirm the fix worked

Test affected applications by feeding crafted selectors known to trigger has_placeholder overflow and confirm absence of crashes after updates; monitor library version strings in build outputs or runtime dependencies to verify patched releases.

Typical attack path

  1. Identify target application or service that invokes libsass for stylesheet compilation or processing
  2. Craft malicious input containing a complex selector with placeholders that triggers the overflow in ast_selectors.cpp
  3. Deliver the input through accepted channels such as file upload, build artifact, or API request
  4. Trigger parsing to cause stack overflow and application crash

How to detect it

Review application and system logs for unexpected crashes or segmentation faults in processes linked to libsass; search build logs or error reports for references to ast_selectors.cpp or ComplexSelector parsing failures around the time of suspected incidents.

What your security team should do

  • Prioritize replacement of libsass with a maintained alternative due to absence of fixed versions and available exploits
  • Add runtime monitoring for crashes in processes using libsass
  • Restrict untrusted Sass input sources in build and runtime pipelines
  • Track upstream libsass project for security patches and update dependency manifests accordingly

The record

Stack overflow vulnerability in ast_selectors.cpp: in function Sass::ComplexSelector::has_placeholder in libsass:3.6.5-8-g210218, which can be exploited by attackers to cause a denial of service (DoS).

Affected packages

Ecosystem Package Introduced Fixed
Bitnami sass 3.6.5-8-g210218 No fix
Bitnami sass 3.6.5-8-g210218 3.6.5
Debian:11 libsass 0 No fix
Debian:12 libsass 0 No fix
Debian:13 libsass 0 3.6.5+20231221-2
Debian:14 libsass 0 3.6.5+20231221-2
SUSE:Linux Enterprise Module for Package Hub 15 SP4 libsass 0 3.6.5-150200.4.10.1
SUSE:Linux Enterprise Module for Package Hub 15 SP5 libsass 0 3.6.5-150200.4.10.1
Ubuntu:16.04:LTS libsass 0 No fix
Ubuntu:20.04:LTS libsass 0 No fix
Ubuntu:22.04:LTS libsass 0 No fix
Ubuntu:24.04:LTS libsass 0 No fix
Ubuntu:24.10 libsass 0 No fix
Ubuntu:Pro:16.04:LTS libsass 0 No fix
Ubuntu:Pro:18.04:LTS libsass 0 No fix
Ubuntu:Pro:20.04:LTS libsass 0 No fix
openSUSE:Leap 15.4 libsass 0 3.6.5-150200.4.10.1
openSUSE:Leap 15.5 libsass 0 3.6.5-150200.4.10.1
openSUSE:Tumbleweed libsass 0 3.6.5-2.1

Related vulnerabilities