Vulnerabilities > CVE-2019-0062 - Session Fixation vulnerability in Juniper Junos

047910
CVSS 6.8 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
juniper
CWE-384
nessus

Summary

A session fixation vulnerability in J-Web on Junos OS may allow an attacker to use social engineering techniques to fix and hijack a J-Web administrators web session and potentially gain administrative access to the device. This issue affects: Juniper Networks Junos OS 12.3 versions prior to 12.3R12-S15 on EX Series; 12.3X48 versions prior to 12.3X48-D85 on SRX Series; 14.1X53 versions prior to 14.1X53-D51; 15.1 versions prior to 15.1F6-S13, 15.1R7-S5; 15.1X49 versions prior to 15.1X49-D180 on SRX Series; 15.1X53 versions prior to 15.1X53-D238; 16.1 versions prior to 16.1R4-S13, 16.1R7-S5; 16.2 versions prior to 16.2R2-S10; 17.1 versions prior to 17.1R3-S1; 17.2 versions prior to 17.2R2-S8, 17.2R3-S3; 17.3 versions prior to 17.3R3-S5; 17.4 versions prior to 17.4R2-S8, 17.4R3; 18.1 versions prior to 18.1R3-S8; 18.2 versions prior to 18.2R3; 18.3 versions prior to 18.3R3; 18.4 versions prior to 18.4R2; 19.1 versions prior to 19.1R1-S2, 19.1R2.

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Session Credential Falsification through Forging
    An attacker creates a false but functional session credential in order to gain or usurp access to a service. Session credentials allow users to identify themselves to a service after an initial authentication without needing to resend the authentication information (usually a username and password) with every message. If an attacker is able to forge valid session credentials they may be able to bypass authentication or piggy-back off some other authenticated user's session. This attack differs from Reuse of Session IDs and Session Sidejacking attacks in that in the latter attacks an attacker uses a previous or existing credential without modification while, in a forging attack, the attacker must create their own credential, although it may be based on previously observed credentials.
  • Exploitation of Session Variables, Resource IDs and other Trusted Credentials
    Attacks on session IDs and resource IDs take advantage of the fact that some software accepts user input without verifying its authenticity. For example, a message queuing system that allows service requesters to post messages to its queue through an open channel (such as anonymous FTP), authorization is done through checking group or role membership contained in the posted message. However, there is no proof that the message itself, the information in the message (such group or role membership), or indeed the process that wrote the message to the queue are authentic and authorized to do so. Many server side processes are vulnerable to these attacks because the server to server communications have not been analyzed from a security perspective or the processes "trust" other systems because they are behind a firewall. In a similar way servers that use easy to guess or spoofable schemes for representing digital identity can also be vulnerable. Such systems frequently use schemes without cryptography and digital signatures (or with broken cryptography). Session IDs may be guessed due to insufficient randomness, poor protection (passed in the clear), lack of integrity (unsigned), or improperly correlation with access control policy enforcement points. Exposed configuration and properties files that contain system passwords, database connection strings, and such may also give an attacker an edge to identify these identifiers. The net result is that spoofing and impersonation is possible leading to an attacker's ability to break authentication, authorization, and audit controls on the system.
  • Accessing/Intercepting/Modifying HTTP Cookies
    This attack relies on the use of HTTP Cookies to store credentials, state information and other critical data on client systems. The first form of this attack involves accessing HTTP Cookies to mine for potentially sensitive data contained therein. The second form of this attack involves intercepting this data as it is transmitted from client to server. This intercepted information is then used by the attacker to impersonate the remote user/session. The third form is when the cookie's content is modified by the attacker before it is sent back to the server. Here the attacker seeks to convince the target server to operate on this falsified information.
  • Manipulating Opaque Client-based Data Tokens
    In circumstances where an application holds important data client-side in tokens (cookies, URLs, data files, and so forth) that data can be manipulated. If client or server-side application components reinterpret that data as authentication tokens or data (such as store item pricing or wallet information) then even opaquely manipulating that data may bear fruit for an Attacker. In this pattern an attacker undermines the assumption that client side tokens have been adequately protected from tampering through use of encryption or obfuscation.
  • Session Credential Falsification through Prediction
    This attack targets predictable session ID in order to gain privileges. The attacker can predict the session ID used during a transaction to perform spoofing and session hijacking.

Nessus

  • NASL familyJunos Local Security Checks
    NASL idJUNIPER_JSA10970.NASL
    descriptionThe version of tested product installed on the remote host is prior to tested version. It is, therefore, affected by a vulnerability as referenced in the JSA10970 advisory. Note that Nessus has not tested for this issue but has instead relied only on the application
    last seen2020-06-01
    modified2020-06-02
    plugin id133303
    published2020-01-29
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/133303
    titleJuniper JSA10970
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include('compat.inc');
    
    if (description)
    {
      script_id(133303);
      script_version("1.1");
      script_cvs_date("Date: 2020/01/29");
    
      script_cve_id(
        "CVE-2019-0047",
        "CVE-2019-0050",
        "CVE-2019-0054",
        "CVE-2019-0055",
        "CVE-2019-0057",
        "CVE-2019-0058",
        "CVE-2019-0059",
        "CVE-2019-0060",
        "CVE-2019-0062",
        "CVE-2019-0063",
        "CVE-2019-0064",
        "CVE-2019-0066",
        "CVE-2019-0067",
        "CVE-2019-0068",
        "CVE-2019-0073",
        "CVE-2019-0075"
      );
      script_xref(name:"IAVA", value:"2019-A-0388");
    
      script_name(english:"Juniper JSA10970");
      script_summary(english:"Checks the Junos version and build date.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote device is missing a vendor-supplied security patch.");
      script_set_attribute(attribute:"description", value:
    "The version of tested product installed on the remote host is prior to
    tested version. It is, therefore, affected by a vulnerability as
    referenced in the JSA10970 advisory. Note that Nessus has not tested
    for this issue but has instead relied only on the application's self-
    reported version number.");
      script_set_attribute(attribute:"see_also", value:"https://kb.juniper.net/KB16613");
      script_set_attribute(attribute:"see_also", value:"https://kb.juniper.net/KB16765");
      script_set_attribute(attribute:"see_also", value:"https://kb.juniper.net/KB16446");
      script_set_attribute(attribute:"see_also", value:"https://kb.juniper.net/JSA10970");
      script_set_attribute(attribute:"solution", value:
    "Apply the relevant Junos software release referenced in Juniper
    advisory JSA10970");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/C:N/I:N/A:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2019-0047");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/01/28");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/01/28");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/01/29");
    
      script_set_attribute(attribute:"plugin_type", value:"combined");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:juniper:junos");
      script_set_attribute(attribute:"stig_severity", value:"I");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Junos Local Security Checks");
    
      script_copyright(english:"This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("junos_version.nasl");
      script_require_keys("Host/Juniper/JUNOS/Version", "Host/Juniper/model");
    
      exit(0);
    }
    
    include('audit.inc');
    include('junos.inc');
    include('misc_func.inc');
    
    ver = get_kb_item_or_exit('Host/Juniper/JUNOS/Version');
    model = get_kb_item_or_exit('Host/Juniper/model');
    fixes = make_array();
    
    fixes['12.1X46'] = '12.1X46-D86';
    fixes['12.3'] = '12.3R12-S13';
    fixes['12.3X48'] = '12.3X48-D80';
    fixes['14.1X53'] = '14.1X53-D51';
    
    if (ver =~ "^15\.1F")
    fixes['15.1F'] = '15.1F6-S13';
    else
      fixes['15.1'] = '15.1R7-S4';
    
    fixes['15.1X49'] = '15.1X49-D171';
    fixes['15.1X53'] = '15.1X53-D69';
    fixes['16.1'] = '16.1R7-S5';
    fixes['16.2'] = '16.2R2-S9';
    fixes['17.1'] = '17.1R3';
    
    if (ver =~ "^17\.2R1")
      fixes['17.2'] = '17.2R1-S8';
    else if (ver =~ "^17\.2R2")
      fixes['17.2'] = '17.2R2-S7';
    else if (ver =~ "^17\.2R3")
      fixes['17.2'] = '17.2R3-S1';
    
    fixes['17.3'] = '17.3R3-S6';
    
    if (ver =~ "^17\.4R1")
      fixes['17.4'] = '17.4R1-S7';
    else if (ver =~ "^17\.4R2")
      fixes['17.4'] = '17.4R2-S4';
    else
      fixes['17.4'] = '17.4R3';
    
    fixes['18.1'] = '18.1R3-S5';
    
    if (ver =~ "^18\.2R1")
      fixes['18.2'] = '18.2R1-S5';
    else if (ver =~ "^18\.2R2")
      fixes['18.2'] = '18.2R2-S3';
    else
      fixes['18.2'] = '18.2R3';
    
    if (ver =~ "^18\.3R1")
      fixes['18.3'] = '18.3R1-S3';
    else if (ver =~ "^18\.3R2")
      fixes['18.3'] = '18.3R2';
    else if (ver =~ "^18\.3R3")
      fixes['18.3'] = '18.3R3';
    
    if (ver =~ "^18\.4R1")
      fixes['18.4'] = '18.4R1-S2';
    else
      fixes['18.4'] = '18.4R2';
    
    fix = check_junos(ver:ver, fixes:fixes, exit_on_fail:TRUE);
    report = get_report(ver:ver, fix:fix);
    security_report_v4(severity:SECURITY_WARNING, port:0, extra:report);
    
  • NASL familyJunos Local Security Checks
    NASL idJUNIPER_JSA10961.NASL
    descriptionAccording to its self-reported version number, the remote Juniper Junos device is affected by a session fixation vulnerability in J-Web. This allows an unauthenticated, remote attacker to use social engineering techniques to fix and hijack a J-Web administrator
    last seen2020-03-18
    modified2019-11-06
    plugin id130519
    published2019-11-06
    reporterThis script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/130519
    titleJunos OS: J-Web Session Fixation Vulnerability (JSA10961)
    code
    #TRUSTED 9a0fbe27dc988f6f275e67c1a982c1b5ff6ecbc2e39d6744efd7adc4e33627a759b5edf880df1c47cc0dad87f42427fe98a7a9b3d2b6765ae9d81e84f4c7d0e1f26aaf6a89d3107e89a761af25a7d41241d5badf3d3f98d3bb47732ca3e383cbca1688761a9e958d96d2613dac3c352c518e05f749237c7de6c1d9f79f9262562d8a767b79db0963528874129b3521ba64bbd3ecfb0c8984536ce875ee2e97a02067f84ef70f734b96a303c770682e364c5a83bdcf85a881e5d951875a42eff5bb82614a89ea67a6b4094158b8e6b0c8cf769751349fa761f3f0f9392e23867da23e54a11909b76a2a0ae62dfde56766836fea3c5835a1ca0e41af84ce72537bb6c3ce6f15c30439093f3663644d31e06c6fc2510f0860b6f265b5b0dfc5ef023418380edf15407087f102ae5fc6e3a9881da9eadd130d20e82d58cdc8032e0c6c4e7d0d48f81615c73dee6b00824c7a6cea92c5a8ea38aa79b6f8f4bac9f994479d68a2f41bb86836654c7d8df0062ac9af03bd7d408b74f7523c4803958a9b38a6c9f6b3d141bcb2d3744d49f478f21a3f2b0b704943940b76fac990c4358a5317e3d7505ff36ccbd76b9bfe457b8ede773b893513b2868ae8ee6642e50c364a1456e2c795265f134a810be0aa07d220666146a88140019d8a55a22db6d7fa1875b965e97b3c2cc5a0ecc803e4156eb5bb04ed922bbb9566dde053da2c25ef
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include('compat.inc');
    
    if (description)
    {
      script_id(130519);
      script_version("1.2");
      script_set_attribute(attribute:"plugin_modification_date", value:"2019/11/06");
    
      script_cve_id("CVE-2019-0062");
      script_xref(name:"JSA", value:"JSA10961");
      script_xref(name:"IAVA", value:"2019-A-0388");
    
      script_name(english:"Junos OS: J-Web Session Fixation Vulnerability (JSA10961)");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote device is missing a vendor-supplied security patch.");
      script_set_attribute(attribute:"description", value:
    "According to its self-reported version number, the remote Juniper Junos device is affected by a session fixation
    vulnerability in J-Web. This allows an unauthenticated, remote attacker to use social engineering techniques to fix and
    hijack a J-Web administrator's web session and potentially gain administrative access to the device.
    
    Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version
    number.");
      script_set_attribute(attribute:"see_also", value:"https://kb.juniper.net/InfoCenter/index?page=content&id=JSA10961");
      script_set_attribute(attribute:"solution", value:
    "Apply the relevant Junos software release referenced in Juniper advisory JSA10961.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2019-0062");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2019/10/09");
      script_set_attribute(attribute:"patch_publication_date", value:"2019/10/09");
      script_set_attribute(attribute:"plugin_publication_date", value:"2019/11/06");
    
      script_set_attribute(attribute:"plugin_type", value:"combined");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:juniper:junos");
      script_set_attribute(attribute:"stig_severity", value:"I");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Junos Local Security Checks");
    
      script_dependencies("junos_version.nasl");
      script_require_keys("Host/Juniper/JUNOS/Version", "Host/Juniper/model");
      exit(0);
    }
    
    include('audit.inc');
    include('junos.inc');
    include('junos_kb_cmd_func.inc');
    include('misc_func.inc');
    
    ver = get_kb_item_or_exit('Host/Juniper/JUNOS/Version');
    model = get_kb_item_or_exit('Host/Juniper/model');
    
    fixes = make_array();
    
    if (model =~ "^EX")
      fixes['12.3'] = '12.3R12-S15';
    if (model =~ '^SRX')
    {
      fixes['12.3X48'] = '12.3X48-D85';
      fixes['15.1X49'] = '15.1X49-D180';
    }
    fixes['14.1X53'] = '14.1X53-D51';
    fixes['15.1F'] = '15.1F6-S13';
    fixes['15.1'] = '15.1R7-S5';
    fixes['15.1X53'] = '15.1X53-D238';
    if (ver =~ '^16.1R7($|[^0-9])')
      fixes['16.1'] = '16.1R7-S5';
    else
      fixes['16.1'] = '16.1R4-S13';
    fixes['16.2'] = '16.2R2-S10';
    fixes['17.1'] = '17.1R3-S1';
    if (ver =~ '^17.2R3($|[^0-9])')
      fixes['17.2'] = '17.2R3-S3';
    else
      fixes['17.2'] = '17.2R2-S8';
    fixes['17.3'] = '17.3R3-S5';
    fixes['17.4'] = '17.4R2-S8';
    fixes['18.1'] = '18.1R3-S8';
    fixes['18.2'] = '18.2R3';
    fixes['18.3'] = '18.3R3';
    fixes['18.4'] = '18.4R2';
    fixes['19.1'] = '19.1R1-S2';
    
    fix = check_junos(ver:ver, fixes:fixes, exit_on_fail:TRUE);
    
    # If J-Web is not enabled, audit out.
    override = TRUE;
    buf = junos_command_kb_item(cmd:'show configuration | display set');
    if (buf)
    {
      override = FALSE;
      pattern = "^set system services web-management http(s)?";
      if (!junos_check_config(buf:buf, pattern:pattern))
        audit(AUDIT_HOST_NOT, 'vulnerable as J-Web is not enabled');
    }
    
    junos_report(model:model, ver:ver, fix:fix, override:override, severity:SECURITY_WARNING);