![Safety Digest Jan 21-28, 2023 | Drupal & Git Advisories Safety Digest Jan 21-28, 2023 | Drupal & Git Advisories](https://bizagility.org/wp-content/uploads/2021/10/Linode-Security-Digest.jpeg)
[ad_1]
On this week’s digest, we’ll focus on:
- How Sudoedit can edit arbitrary recordsdata;
- Drupal and Git safety advisories; and
- A denial of service vulnerability in HAProxy.
Sudoedit can edit arbitrary recordsdata
CVE ID: CVE-2023-22809
Sudo is a program that enables a system administrator to offer chosen customers the power to run instructions as root. Synacktiv found this vulnerability. A sudoers coverage bypassing concern may result in privilege escalation through the use of sudoedit to edit unauthorized recordsdata. The affected variations of Sudo vary from 1.8.0 to 1.9.12p1.
Whereas utilizing sudoedit, customers choose their enhancing consumer through the use of surroundings variables, comparable to SUDO_EDITOR, VISUAL, and EDITOR. The content material of those variables extends the precise command handed to the sudo_edit() operate. A “—” argument is meant to find out the record of recordsdata to edit. Nevertheless, the injection of an additional “—” argument within the licensed surroundings variables can alter this record and result in privilege escalation by enhancing every other file with the goal consumer’s privileges.
Detection
The vulnerability might be detected by operating the next command as a consumer with the file being granted to edit, comparable to /and so forth/customized/service.conf, listed within the /and so forth/sudoers file.
$ cat /and so forth/sudoers
consumer ALL=(ALL:ALL) sudoedit /and so forth/customized/service.conf
[...]
$ EDITOR='vim -- /and so forth/passwd' sudoedit /and so forth/customized/service.conf
Mitigation
Apart from upgrading to the patched model, it’s also potential to mitigate the vulnerability by including the affected surroundings variables to the env_delete deny record when utilizing sudoedit.
Defaults!SUDOEDIT env_delete+="SUDO_EDITOR VISUAL EDITOR"
Cmnd_Alias SUDOEDIT = sudoedit /and so forth/customized/service.conf
consumer ALL=(ALL:ALL) SUDOEDIT
Drupal safety advisories
Drupal has launched safety advisories to handle vulnerabilities affecting a number of merchandise. An attacker may exploit these vulnerabilities to entry delicate info. CISA encourages customers and directors to overview the next Drupal safety advisories and apply the mandatory updates.
Drupal Core – Data Disclosure
Safety advisories code: SA-CORE-2023-001
Customers with entry to edit content material may see the metadata of media objects they aren’t licensed to entry on account of improper entity entry checking within the Media Library module. Vulnerability mitigation is feasible as a result of the inaccessible media is barely seen to customers who can already edit the content material together with a media reference discipline.
No matter Drupal previous to 9.4.x being end-of-life, it’s endorsed to replace to the newest variations, together with Drupal 10.0.2, Drupal 9.5.2, and Drupal 9.4.10.
Entity Browser – Data Disclosure
Safety advisories code: SA-CONTRIB-2023-002
Customers can choose entities from entity reference fields utilizing a customized entity browser widget from the Entity Browser module. This vulnerability permits customers with entry to edit content material to see the metadata of entities they aren’t licensed to entry, because the module doesn’t test the entity entry correctly. The vulnerability might be mitigated by the truth that the inaccessible entities will solely be seen to customers who can already edit the content material utilizing Entity Browser. To repair the vulnerability, if utilizing the Entity Browser module for Drupal 9 or 10, improve the Entity Browser to model 8.x-2.9.
Media Library Block – Data Disclosure
Safety advisories code: SA-CONTRIB-2023-003
The Media Library Block module permits customers to render media entities in a block. The improper media entry checking by the module may lead to customers seeing the media they aren’t licensed to entry if a block containing restricted media objects is on the web page. Mitigate this unauthorized entry by eradicating blocks referencing media objects with entry restrictions. If utilizing the Media Library Block module for Drupal 9 or 10, it’s endorsed to improve it to model 1.0.4 to repair the difficulty.
Media Library Type API Component – Data Disclosure
Safety advisories code: SA-CONTRIB-2023-004
The Media Library Type API Component module permits customers to make use of the media library in customized types with out the Media Library Widget. As a result of improper entity entry test by the module, customers with entry to edit content material may see metadata of media objects they aren’t licensed to entry. Mitigate vulnerability by making inaccessible media solely seen to customers who can already edit the content material that features a media reference discipline. If the Media Library Type API Component module variations 8.x-1.*, or 2.x for Drupal 9 or 10, it’s endorsed to improve the module to model 2.0.6.
Git safety advisories
A safety audit of supply code for Git has revealed a number of vulnerabilities, together with two vital severity ones that might enable attackers to execute arbitrary code after efficiently exploiting heap-based buffer overflow weaknesses. Each vital vulnerabilities are patched in Git variations v2.30.7, v2.31.6, v2.32.5, v2.33.6, v2.34.6, v2.35.6, v2.36.4, v2.37.5, v2.38.3, and v2.39.1.
Heap overflow in `git archive`, `git log –format` resulting in RCE
CVE ID: CVE-2022-41903
git log can show commits in an arbitrary format with a –format specifier. git archive with the export-subst gitattribute additionally has this performance. When the padding operators are processed, a size_t variable is badly saved as an int in fairly.c format_and_pad_commit() operate, it’s then added as an offset to a following memcpy() name. Attackers can provoke the overflow by operating git log –format=… to invoke the commit formatting or by operating git archive with the export-subst attribute, which expands the format specifier for a file. The integer overflow could cause distant code execution by writing arbitrary code into reminiscence.
Workarounds
It is suggested to improve Git to the newest model, which utterly fixes the vulnerability. If upgrading isn’t relevant, customers shouldn’t run git archive on an untrusted repository. If git archive is uncovered through git daemon, run git config –international daemon.uploadArch false to disable the command.
gitattributes parsing integer overflow
CVE ID: CVE-2022-23521
Git permits customers to outline attributes for paths by including a .gitattributes file to the repository, which comprises a set of file patterns and attributes that ought to be set for these recordsdata matching the sample. A couple of situations could make the integer overflow occur when parsing attributes:
- when there’s an extreme variety of path patterns;
- when there are quite a few attributes for a single sample;
- when the declared attribute’s names are intensive.
The overflows might be triggered when the crafted .gitattributes file is a part of the commit historical past. Traces longer than 2KB are break up silently when parsing gitattributes from a file, however not from the index. Because of this, failure can occur when the file exists within the index, within the working tree, or each. The vulnerability can result in arbitrary head reads and writes, leading to distant code execution.
Workarounds
No relevant workaround is revealed. The one workaround is to improve Git to the listed newest patched model.
Denial of service vulnerability in HAProxy
CVE ID: CVE-2023-0056
HAProxy is a high-availability server load balancer for HTTP purposes. This vulnerability exists because of the failure of sudden flag dealing with within the http_wait_for_response() operate, which may end up in the method crashing. Because of this, the vulnerability permits an attacker to carry out a denial of service assault.
The weak model of HAProxy ranges from 2.0.0 to 2.7.0. Patch vulnerabilities in variations 2.5.11, 2.6.8, and a couple of.7.2. Nevertheless, the fastened variations for two.0.x to 2.4.x have but to be launched.
[ad_2]