Skip to content
OpenAdvisories

Weakness (CWE)

CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code

Variant Incomplete

The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. "eval").

How to prevent it (4 mitigations)
  1. Architecture and Design, Implementation

    If possible, refactor your code so that it does not need to use eval() at all.

  2. Implementation

    Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

    When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."

    Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

  3. Implementation

    Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180, CWE-181). Make sure that your application does not inadvertently decode the same input twice (CWE-174). Such errors could be used to bypass allowlist schemes by introducing dangerous inputs after they have been checked. Use libraries such as the OWASP ESAPI Canonicalization control.

    Consider performing repeated canonicalization until your input does not change any more. This will avoid double-decoding and similar scenarios, but it might inadvertently modify inputs that are allowed to contain properly-encoded dangerous content.

  4. Implementation

    For Python programs, it is frequently encouraged to use the ast.literal_eval() function instead of eval, since it is intentionally designed to avoid executing code. However, an adversary could still cause excessive memory or stack consumption via deeply nested structures [REF-1372], so the python documentation discourages use of ast.literal_eval() on untrusted data [REF-1373].

Source: MITRE CWE-95

243 results · Feed

  • High 8.8

    Privilege escalation in mk_tsm

    Privilege escalation in mk_tsm agent plugin in Checkmk before 2.2.0p18, 2.1.0p38 and 2.0.0p39 allows local user to escalate privileges

  • Critical 10.0
    CVE-2024-21650 Scanner template EPSS 93%

    XWiki Remote Code Execution vulnerability via user registration

    XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. XWiki is vulnerable to a remote code execution (RCE) attack through its user registration feature. This issue allows an attacker to execute arbitrary code…

  • High 7.8

    OpenVPN Connect version 3.0 through 3.4.6 on macOS allows local users to execute code in external third party libraries…

  • High 7.8
    CVE-2023-7101 Exploited Public exploit EPSS 19%

    Arbitrary Code Execution (ACE) Vulnerability

    Spreadsheet::ParseExcel version 0.65 is a Perl module used for parsing Excel files. Spreadsheet::ParseExcel is vulnerable to an arbitrary code execution (ACE) vulnerability due to passing unvalidated input from a file into a string-type “eval”. Specifically, …

    KEV Jan 2, 2024
  • Critical 10.0

    XWiki Platform remote code execution/programming rights with configuration section from any user account

    XWiki Platform is a generic wiki platform. Starting in 2.3 and prior to versions 14.10.15, 15.5.2, and 15.7-rc-1, anyone who can edit an arbitrary wiki page in an XWiki installation can gain programming right through several cases of missing escaping in the c…

  • Critical 10.0
    CVE-2023-50721 EPSS 79%

    XWiki Platform RCE from account through SearchAdmin

    XWiki Platform is a generic wiki platform. Starting in 4.5-rc-1 and prior to versions 14.10.15, 15.5.2, and 15.7-rc-1, the search administration interface doesn't properly escape the id and label of search user interface extensions, allowing the injection of …

  • High 8.4

    fastbots Eval Injection vulnerability

    fastbots is a library for fast bot and scraper development using selenium and the Page Object Model (POM) design. Prior to version 0.1.5, an attacker could modify the locators.ini locator file with python code that without proper validation it's executed and …

  • Critical 10.0
    CVE-2023-46731 EPSS 90%

    Remote code execution through the section parameter in Administration as guest in XWiki Platform

    XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. XWiki doesn't properly escape the section URL parameter that is used in the code for displaying administration sections. This allows any user with read ac…

  • Critical 10.0

    Privilege escalation (PR)/remote code execution from account through Menu.UIExtensionSheet

    XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Starting in version 5.1-rc-1 and prior to versions 14.10.8 and 15.3-rc-1, any user who can edit their own user profile can execute arbitrary script macros…

  • Critical 9.9

    XWiki Platform privilege escalation (PR) from account through AWM content fields

    XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Any registered user can use the content field of their user profile page to execute arbitrary scripts with programming rights, thus effectively performing…

  • Critical 9.9

    Privilege escalation (PR)/RCE from account through Invitation subject/message

    XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Any user who can view `Invitation.WebHome` can execute arbitrary script macros including Groovy and Python macros that allow remote code execution includi…

  • Critical 10.0
    CVE-2023-37462 Scanner template EPSS 92%

    Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') in org.xwiki.platform:xwiki-platform-skin-ui

    XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Improper escaping in the document `SkinsCode.XWikiSkinsSheet` leads to an injection vector from view right on that document to programming rights, or in o…

  • Critical 10.0

    XWiki Platform vulnerable to privilege escalation (PR) from account through like LiveTableResults

    XWiki Platform is a generic wiki platform. Starting in version 12.9-rc-1 and prior to versions 14.4.8, 14.10.6, and 15.1, any logged in user can add dangerous content in their first name field and see it executed with programming rights. Leading to rights esc…

  • Critical 9.9
    CVE-2023-35150 EPSS 78%

    XWiki Platform vulnerable to privilege escalation (PR) from view right via Invitation application

    XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Starting in version 2.40m-2 and prior to versions 14.4.8, 14.10.4, and 15.0, any user with view rights on any document can execute code with programming r…

  • Critical 9.9
    CVE-2023-29516 EPSS 66%

    Code injection from view right on XWiki.AttachmentSelector in xwiki-platform

    XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Any user with view rights on `XWiki.AttachmentSelector` can execute arbitrary Groovy, Python or Velocity code in XWiki leading to full access to the XWiki…

  • Critical 9.1

    org.xwiki.platform:xwiki-platform-logging-ui Injection vulnerability

    XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. In affected versions of `org.xwiki.platform:xwiki-platform-logging-ui` it is possible to trick a user with programming rights into visiting a constructed …

  • Critical 9.9

    xwiki-platform-administration-ui vulnerable to privilege escalation

    XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Any user with edit rights on a page (e.g., it's own user page), can execute arbitrary Groovy, Python or Velocity code in XWiki leading to full access to t…

  • Critical 9.9

    org.xwiki.platform:xwiki-platform-flamingo-theme-ui vulnerable to privilege escalation

    XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Any user with the right to add an object on a page can execute arbitrary Groovy, Python or Velocity code in XWiki leading to full access to the XWiki inst…

  • Critical 10.0
    CVE-2023-29509 EPSS 76%

    org.xwiki.platform:xwiki-platform-flamingo-theme-ui Eval Injection vulnerability

    XWiki Commons are technical libraries common to several other top level XWiki projects. Any user with view rights on commonly accessible documents can execute arbitrary Groovy, Python or Velocity code in XWiki leading to full access to the XWiki installation.…

  • Critical 10.0

    org.xwiki.platform:xwiki-platform-panels-ui Eval Injection vulnerability

    XWiki Commons are technical libraries common to several other top level XWiki projects. Any user with edit rights can execute arbitrary Groovy, Python or Velocity code in XWiki leading to full access to the XWiki installation. The root cause is improper escap…

  • Critical 10.0

    xwiki.platform:xwiki-platform-panels-ui Eval Injection vulnerability

    XWiki Commons are technical libraries common to several other top level XWiki projects. Any user with edit rights can execute arbitrary Groovy, Python or Velocity code in XWiki leading to full access to the XWiki installation. The root cause is improper escap…

  • Critical 10.0

    org.xwiki.platform:xwiki-platform-wiki-ui-mainwiki Eval Injection vulnerability

    XWiki Commons are technical libraries common to several other top level XWiki projects. Any user with view rights `WikiManager.DeleteWiki` can execute arbitrary Groovy, Python or Velocity code in XWiki leading to full access to the XWiki installation. The roo…

  • Critical 10.0

    org.xwiki.platform:xwiki-platform-notifications-ui Eval Injection vulnerability

    XWiki Commons are technical libraries common to several other top level XWiki projects. Any user with view rights on commonly accessible documents including the notification preferences macros can execute arbitrary Groovy, Python or Velocity code in XWiki lea…

  • Critical 10.0

    org.xwiki.platform:xwiki-platform-legacy-notification-activitymacro Eval Injection vulnerability

    XWiki Commons are technical libraries common to several other top level XWiki projects. Any user with view rights on commonly accessible documents including the legacy notification activity macro can execute arbitrary Groovy, Python or Velocity code in XWiki …

  • Medium 4.9

    Authenticated eval injection in B. Braun Space Battery pack SP with Wi-Fi

    An improper neutralization of directives in dynamically evaluated code vulnerability in the WiFi Battery embedded web server in versions L90/U70 and L92/U92 can be used to gain administrative access to the WiFi communication module. An authenticated user, hav…

  • Critical 9.8
    CVE-2023-0090 Public exploit

    Proofpoint Enterprise Protection webservices unauthenticated RCE

    The webservices in Proofpoint Enterprise Protection (PPS/POD) contain a vulnerability that allows for an anonymous user to execute remote code through 'eval injection'. Exploitation requires network access to the webservices API, but such access is a non-stan…

  • High 8.8
    CVE-2023-0089 Public exploit

    Proofpoint Enterprise Protection webutils authenticated RCE

    The webutils in Proofpoint Enterprise Protection (PPS/POD) contain a vulnerability that allows an authenticated user to execute remote code through 'eval injection'. This affects all versions 8.20.0 and below.

  • Critical 10.0
    CVE-2023-26477 EPSS 75%

    org.xwiki.platform:xwiki-platform-flamingo-theme-ui Eval Injection vulnerability

    XWiki Platform is a generic wiki platform. Starting in versions 6.3-rc-1 and 6.2.4, it's possible to inject arbitrary wiki syntax including Groovy, Python and Velocity script macros via the `newThemeName` request parameter (URL parameter), in combination with…

  • High —

    code injection in phpxmlrpc/phpxmlrpc

    code injection in `Wrapper::buildClientWrapperCode` via manipulation of the `$client` argument. It was possible to force the client to access local files or connect to undesired urls instead of the intended target server's url.

  • Critical 9.9

    Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') in xwiki-platform-icon-ui

    xwiki-platform-icon-ui is vulnerable to Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection'). Any user with view rights on commonly accessible documents including the icon picker macro can execute arbitrary Groovy, Python or …

  • Critical 9.9

    XWiki Platform vulnerable to Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') in AttachmentSelector.xml

    XWiki Platform vulnerable to Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') in AttachmentSelector.xml. The issue can also be reproduced by inserting the dangerous payload in the `height` or `alt` macro properties. This …

  • Critical 9.8
    CVE-2022-40871 EPSS 35%

    Dolibarr vulnerable to Eval Injection

    Dolibarr ERP & CRM <=15.0.3 is vulnerable to Eval injection. By default, any administrator can be added to the installation page of dolibarr, and if successfully added, malicious code can be inserted into the database and then execute it by eval.

  • Critical 9.9
    CVE-2022-36100 EPSS 74%

    XWiki Platform Applications Tag and XWiki Platform Tag UI vulnerable to Eval Injection

    XWiki Platform Applications Tag and XWiki Platform Tag UI are tag applications for XWiki, a generic wiki platform. Starting with version 1.7 in XWiki Platform Applications Tag and prior to 13.10.6 and 14.4 in XWiki Platform Tag UI, the tags document `Main.Tag…

  • Critical 9.9
    CVE-2022-36099 EPSS 76%

    XWiki Platform Wiki UI Main Wiki Eval Injection vulnerability

    XWiki Platform Wiki UI Main Wiki is software for managing subwikis on XWiki Platform, a generic wiki platform. Starting with version 5.3-milestone-2 and prior to versions 13.10.6 and 14.4, it's possible to inject arbitrary wiki syntax including Groovy, Python…

  • Medium 6.1

    Code injection issue in Portal for ArcGIS (10.7.1 and 10.8.1)

    There is a code injection vulnerability in Esri Portal for ArcGIS versions 10.8.1 and below that may allow a remote, unauthenticated attacker to pass strings which could potentially cause arbitrary code execution.

  • Critical 10.0

    Arbitrary code execution via function parsing in react-editable-json-tree

    This library allows strings to be parsed as functions and stored as a specialized component, [`JsonFunctionValue`](https://github.com/oxyno-zeta/react-editable-json-tree/blob/09a0ca97835b0834ad054563e2fddc6f22bc5d8c/src/components/JsonFunctionValue.js). To do…

  • Critical 9.8
    CVE-2022-31181 Public exploit Scanner template

    Remote code execution in prestashop

    PrestaShop is an Open Source e-commerce platform. In versions from 1.6.0.10 and before 1.7.8.7 PrestaShop is subject to an SQL injection vulnerability which can be chained to call PHP's Eval function on attacker input. The problem is fixed in version 1.7.8.7.…

  • Medium 6.5

    A function module of SAP NetWeaver AS ABAP (Reconciliation Framework), versions - 700, 701, 702, 710, 711, 730, 731, 74…

  • High 8.3

    Improper Neutralization of Directives in Dynamically Evaluated Code

    Eaton Intelligent Power Manager (IPM) prior to 1.69 is vulnerable to unauthenticated eval injection vulnerability. The software does not neutralize code syntax from users before using in the dynamic evaluation call in loadUserFile function under scripts/libs/…

  • High 8.3

    The web interface of the Vertiv Avocent UMG-4000 version 4.2.1.19 is vulnerable to arbitrary remote code execution

    The web interface of the Vertiv Avocent UMG-4000 version 4.2.1.19 is vulnerable to command injection because the application incorrectly neutralizes code syntax before executing. Since all commands within the web application are executed as root, this could a…