Skip to content

Revisit Update Illuminate Database library for GHSA-3p32-j457-pg5x (#6632) #6718

@asmecher

Description

@asmecher

Issue Description

OJS, OMP, and OPS use the 3rd-party Illuminate/Database package for database interactions. Recently a potential vulnerability in this package was published: GHSA-3p32-j457-pg5x.

The original fix for this issue was applied in #6632 and released in OJS/OMP/OPS 3.2.1-3 and 3.3.0-2. However, apparently the previous fix was not complete -- see laravel/framework#35865 (comment). This has led to another release of illuminate/database with an additional fix applied.

Affected releases

PKP has not definitively confirmed whether its software can be attacked using this mechanism, but out of an abundance of caution recommends resolving it.

  • OJS, OMP, and OPS 3.3.0-3 and newer are not affected.
  • OJS, OMP, and OPS 3.2.1-4 and newer are not affected.
  • OJS, OMP, and OPS 3.3.0-0 (RC1), 3.3.0-1 (RC2), and 3.3.0-2 (OJS 3.3.0) may be affected.
  • OJS, OMP, and OPS 3.2.0 (all builds), 3.2.1-0, 3.2.1-1, 3.2.1-2, and 3.2.1-3 may be affected.
  • All builds of OJS and OMP 3.1.1, and 3.1.2 may be affected.
  • All builds of OJS 3.1.0 may be affected.
  • OMP 3.1.0 and older are not affected. OJS 3.0.2 and older are not affected.

Resolution

The best way to resolve this issue is to use the latest releases of OJS, OMP, or OPS. This issue is resolved in 3.3.0-3 and 3.2.1-4. For older releases, the issue can be corrected following the instructions below.

Check your OJS/OMP/OPS code version by looking in dbscrits/xml/version.xml.

OJS/OMP/OPS 3.3.0-0 (RC1), 3.3.0-1 (RC2), 3.3.0-2 (3.3.0)

To resolve this issue, use Composer:

cd lib/pkp
composer require laravel/framework:7.30.4

You should see the following confirmation that 7.30.4 has been installed and patched:

Gathering patches for dependencies. This might take a minute.
  - Updating laravel/framework (v7.30.3 => v7.30.4): Downloading (100%)         
  - Applying patches for laravel/framework
    lib/laravel-helper-4017.diff (Inhibit __ Laravel helper)

If you see this, the issue is resolved!

Affected versions of OJS/OMP/OPS 3.2.1 or older

If you are using OJS/OMP/OPS 3.2.1-3, then only the steps below are necessary. Otherwise, you must apply the changes documented in #6632 before following the instructions below.

When applying patches, it is always recommended to use the --dry-run option first to ensure that the patch will apply cleanly.

Correction Using Composer (recommended)

Depending on your version of OJS, OMP, or OPS, use one of the following patch URLs in the instructions below in place of PATCH URL HERE:

To apply the fix:

  1. Patch the Composer configuration file:

    cd lib/pkp
    wget -O - -q "PATCH URL HERE" | patch -p1

    You should see the following output:

    patching file composer.json
    patching file lib/laravel-binding-6718.diff
    
  2. Run Composer to apply the patch:

    composer install

    You should see the following output:

    Gathering patches for dependencies. This might take a minute.
    - Installing illuminate/database (v5.8.36): Loading from cache
    - Applying patches for illuminate/database
      lib/laravel-binding-6632.diff (Patch Laravel binding array issue)
      lib/laravel-binding-6718.diff (Patch Laravel binding array issue v2)
    

    This indicates that two patches were successfully applied. If you see this, the issue is resolved.

Correction By Patching Illuminate/Database Directly

This method involves modifying a dependency, and re-running Composer may cause the changes to be reverted. For this reason it's preferable to use the Composer-based update method documented above.

Depending on your version of OJS, OMP, or OPS, use one of the following patch URLs in the instructions below in place of PATCH URL HERE:

To directly patch the issue:

cd lib/pkp/lib/vendor/illuminate/database
wget -q -O - "PATCH URL HERE" | patch -p4 --dry-run

You should see the following output:

patching file Query/Builder.php

This indicates that the patch was successfully applied. If you see this, the issue is resolved.

Metadata

Metadata

Assignees

Labels

Bug:1:MinorA bug found in uncommon paths, with low consequences, limited users or has an easy workaroundBug:3:CriticalA bug that prevents a substantial majority of users from using the software.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy