Skip to content

Memory leak in cJSON lib

Moderate
razvancrainea published GHSA-2mg2-g46r-j4qr Mar 15, 2023

Package

opensips (OpenSIPS Core)

Affected versions

2.3 - 3.2

Patched versions

3.1.8, 3.2.5

Description

A memory leak was detected in the function parse_mi_request while performing coverage-guided
fuzzing.

This issue can be reproduced by sending multiple requests of the following form:
{"jsonrpc": "2.0","method": "log_le

This malformed message was tested against an instance of OpenSIPS via FIFO transport layer and was
found to increase the memory consumption over time.

Impact

To abuse this memory leak, attackers need to reach the management interface which typically, should be
only exposed on trusted interfaces. In cases where the MI is exposed to the internet without authentication,
abuse of this issue will lead to memory exhaustion which may affect the underlying system’s availability. No
authentication is typically required to reproduce this issue.

On the other hand, memory leaks may occur in other areas of OpenSIPS where the cJSON library is used for parsing JSON objects.

Patches

The issue has been fixed in commit: 4175687.

References

Read more about this issue in the Audit Document section 3.14.

For more information

If you have any questions or comments about this advisory:

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:N/A:H

CVE ID

CVE-2023-28096

Weaknesses

No CWEs

Credits