Skip to content

GHSA-c273-c6vg-4pv5 BIT-publify-2022-1810 CVE-2022-1810

Publify has Improper Access Controls

Medium RubyGems
Severity
4.3 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.84%
Chance of exploitation in the next 30 days. Higher than 57.86% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-284 Improper Access Control
CWE-639 Authorization Bypass Through User-Controlled Key
CWE-732 Incorrect Permission Assignment for Critical Resource
Fix
9.2.9
Upgrade publify_core to this version or later

Description

A low-privileged user can modify and delete admin articles by changing the value of the article[id] parameter prior to 9.2.9.

Affected versions

RubyGems

PackageVulnerableFixed in
publify_core
< 9.2.9
9.2.9

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

publify_core RubyGems → 9.2.9

bundler
bundle update publify_core # Gemfile: gem "publify_core", ">= 9.2.9"

Severity breakdown

CVSS 3.1 4.3

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

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

Weakness

CWE-284: Improper Access Control

The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.

How to prevent it
  • Architecture and Design, Operation: Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.

CWE-639: Authorization Bypass Through User-Controlled Key

The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data.

How to prevent it
  • Architecture and Design: For each and every data access, ensure that the user has sufficient privilege to access the record that is being requested.
  • Architecture and Design, Implementation: Make sure that the key that is used in the lookup of a specific user's record is not controllable externally by the user or that any tampering can be detected.
  • Architecture and Design: Use encryption in order to make it more difficult to guess other legitimate values of the key or associate a digital signature with the key so that the server can verify that there has been no tampering.

CWE-732: Incorrect Permission Assignment for Critical Resource

The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.

How to prevent it
  • Implementation: When using a critical resource such as a configuration file, check to see if the resource has insecure permissions (such as being modifiable by any regular user) [REF-62], and generate an error or even exit the software if there is a possibility that the resource could have been modified by an unauthorized party.
  • Architecture and Design: Divide the software into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully defining distinct user groups, privileges, and/or roles. Map these against data, functionality, and the related resources. Then set the permissions accordingly. This will allow you to maintain more fine-grained control over your resources. [REF-207]
  • Architecture and Design, Operation: Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software. OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.
  • Implementation, Installation: During program startup, explicitly set the default permissions or umask to the most restrictive setting possible. Also set the appropriate permissions during program installation. This will prevent you from inheriting insecure permissions from any user who installs or runs the program.
  • System Configuration: For all configuration files, executables, and libraries, make sure that they are only readable and writable by the software's administrator.
  • Documentation: Do not suggest insecure configuration changes in documentation, especially if those configurations can extend to resources and other programs that are outside the scope of the application.
  • Installation: Do not assume that a system administrator will manually change the configuration to the settings that are recommended in the software's manual.
  • Operation, System Configuration: Ensure that the software runs properly under the United States Government Configuration Baseline (USGCB) [REF-199] or an equivalent hardening configuration guide, which many organizations use to limit the attack surface and potential risk of deployed software.
  • Implementation, System Configuration, Operation: When storing data in the cloud (e.g., S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to disable public access.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-8fm5-gg2f-f66q
Publify Vulnerable To Cross-Site Scripting (XSS) Via Redirects Requiring User Interaction
Medium Also affects publify_core
GHSA-g7gf-2rqw-5rwx
Publify contains Weak Password Requirements
Medium Also affects publify_core
GHSA-rc42-jghf-vr8f
Integer overflow in publify_core
Critical Also affects publify_core
GHSA-q3rm-f527-ghxj
Publify Improper Input Validation vulnerability
Critical Also affects publify_core
GHSA-79wq-g4v9-gfj4
Publify Core does not strip metadata from images
Medium Also affects publify_core
GHSA-wmh9-x28j-c6gr
Cross site scripting in publify
Medium Also affects publify_core
GHSA-3h7v-wqw7-ff28
Cross site scripting in publify
Medium Also affects publify_core
GHSA-3hwx-c6cp-q972
Publify vulnerable to cross site scripting
Critical Also affects publify_core
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor