Lucene search

K
nessusThis script is Copyright (C) 2024 and is owned by Tenable, Inc. or an Affiliate thereof.LARAVEL_CVE-2018-15133.NASL
HistoryApr 15, 2024 - 12:00 a.m.

Laravel Framework < 5.5.41 / 5.6.x < 5.6.30 RCE

2024-04-1500:00:00
This script is Copyright (C) 2024 and is owned by Tenable, Inc. or an Affiliate thereof.
www.tenable.com
25
laravel framework
remote code execution
vulnerability
unserialize call
x-xsrf-token
decrypt method
application key

6.8 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:M/Au:N/C:P/I:P/A:P

8.1 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

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

7.8 High

AI Score

Confidence

Low

0.969 High

EPSS

Percentile

99.7%

The version of Laravel Framework installed of the remote host is prior to 5.5.41 or 5.6.x prior to 5.6.30. It is, therefore, affected by a remote code execution vulnerability due to an unserialize call on a potentially untrusted X-XSRF-TOKEN value. This involves the decrypt method in Illuminate/Encryption/Encrypter.php and PendingBroadcast in gadgetchains/Laravel/RCE/3/chain.php in phpggc. The attacker must know the application key, which normally would never occur, but could happen if the attacker previously had privileged access or successfully accomplished a previous attack.

Note that Nessus has not tested for this issue but has instead relied only on the application’s self-reported version number. Also note that this plugin does not distinguish between PHP packages installed via the OS package manager, PHP packages installed via Composer, or other sources. As a result, packages provided by your OS package repository may have backported fixes that this plugin may incorrectly report as vulnerable. Please refer to the OS-specific plugins for CVE-2018-15133 to check for backported fixes.

#%NASL_MIN_LEVEL 80900
##
# (C) Tenable, Inc.
##

include('compat.inc');

if (description)
{
  script_id(193333);
  script_version("1.2");
  script_set_attribute(attribute:"plugin_modification_date", value:"2024/04/16");

  script_cve_id("CVE-2018-15133");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2024/02/06");

  script_name(english:"Laravel Framework < 5.5.41 / 5.6.x < 5.6.30 RCE");

  script_set_attribute(attribute:"synopsis", value:
"A PHP library installed on the remote host is affected by a remote code execution vulnerability.");
  script_set_attribute(attribute:"description", value:
"The version of Laravel Framework installed of the remote host is prior to 5.5.41 or 5.6.x prior to 5.6.30. It is,
therefore, affected by a remote code execution vulnerability due to an unserialize call on a potentially untrusted 
X-XSRF-TOKEN value. This involves the decrypt method in Illuminate/Encryption/Encrypter.php and PendingBroadcast in 
gadgetchains/Laravel/RCE/3/chain.php in phpggc. The attacker must know the application key, which normally would never
occur, but could happen if the attacker previously had privileged access or successfully accomplished a previous attack.

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version
number. Also note that this plugin does not distinguish between PHP packages installed via the OS package manager,
PHP packages installed via Composer, or other sources. As a result, packages provided by your OS package repository may
have backported fixes that this plugin may incorrectly report as vulnerable. Please refer to the OS-specific plugins for
CVE-2018-15133 to check for backported fixes.");
  script_set_attribute(attribute:"see_also", value:"https://laravel.com/");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Laravel Framework version 5.5.41, 5.6.30 or later.");
  script_set_attribute(attribute:"agent", value:"all");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2018-15133");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2018/08/08");
  script_set_attribute(attribute:"patch_publication_date", value:"2018/08/08");
  script_set_attribute(attribute:"plugin_publication_date", value:"2024/04/15");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:laravel:laravel");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Misc.");

  script_copyright(english:"This script is Copyright (C) 2024 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("php_composer_enum_nix.nbin", "php_composer_enum_win.nbin");
  script_require_keys("language_library/package/composer/enumerated");

  exit(0);
}

include('vcf.inc');

get_kb_item_or_exit('language_library/package/composer/enumerated');

var app = 'Laravel Framework';

var version = get_kb_item('language_library/package/composer/laravel/framework/version');
var lock_file = get_kb_item('language_library/package/composer/laravel/framework/lock_file');
if (empty_or_null(version) || empty_or_null(lock_file))
  audit(AUDIT_NOT_INST, app);

var lib_info = {
  'app': app,
  'version': version,
  'display_version': version,
  'parsed_version': vcf::parse_version(version),
  'path': lock_file
};

var constraints = [
  {'fixed_version': '5.5.41'},
  {'min_version': '5.6.0', 'fixed_version': '5.6.30'}
];

vcf::check_version_and_report(app_info:lib_info, constraints:constraints, severity:SECURITY_WARNING);
VendorProductVersionCPE
laravellaravelcpe:/a:laravel:laravel

6.8 Medium

CVSS2

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:M/Au:N/C:P/I:P/A:P

8.1 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

HIGH

Availability Impact

HIGH

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

7.8 High

AI Score

Confidence

Low

0.969 High

EPSS

Percentile

99.7%