Apache NiFi welcomes the responsible reporting of security vulnerabilities. Project Management Committee members will collaborate and respond to potential vulnerabilities, providing an assessment of the concern and a plan of action to remediate verified issues.
Please read the Apache Project Security for Committers policy for general guidelines applicable disclosure of security issues for Apache Software Foundation projects.
Do not perform the following actions after discovering a potential security concern:
Configuring dangerous operating system commands or custom scripts is not a project security vulnerability. Authenticated and authorized users are responsible for the security of operating system commands and custom code.
Apache NiFi provides a framework for developing processing pipelines using standard and custom components. The framework supports configurable permissions that enable authorized users to execute code using several standard components. Components such as ExecuteProcess and ExecuteStreamCommand support running operating system commands, while other scripted components support executing custom code using different programming languages. Configuring these components with untrusted commands or arguments is contrary to best practices, but it does not constitute of security issue for remediation.
Severity ratings represent the determination of project members based on an evaluation of Common Vulnerability Scoring System calculations.
The following announcements include published vulnerabilities that apply directly to Apache NiFi components.
Apache NiFi 0.7.0 through 1.23.2 include the JoltTransformJSON Processor, which provides an advanced configuration user interface that is vulnerable to DOM-based cross-site scripting. If an authenticated user, who is authorized to configure a JoltTransformJSON Processor, visits a crafted URL, then arbitrary JavaScript code can be executed within the session context of the authenticated user. Upgrading to Apache NiFi 1.24.0 or 2.0.0-M1 is the recommended mitigation.
Apache NiFi 1.21.0 through 1.23.0 support JDBC and JNDI JMS access in several Processors and Controller Services with connection URL validation that does not provide sufficient protection against crafted inputs. An authenticated and authorized user can bypass connection URL validation using custom input formatting. The resolution enhances connection URL validation and introduces validation for additional related properties. Upgrading to Apache NiFi 1.23.1 is the recommended mitigation.
Apache NiFi 0.0.2 through 1.22.0 include Processors and Controller Services that support HTTP URL references for retrieving drivers, which allows an authenticated and authorized user to configure a location that enables custom code execution. The resolution introduces a new Required Permission for referencing remote resources, restricting configuration of these components to privileged users. The permission prevents unprivileged users from configuring Processors and Controller Services annotated with the new Reference Remote Resources restriction. Upgrading to Apache NiFi 1.23.0 is the recommended mitigation.
The DBCPConnectionPool and HikariCPConnectionPool Controller Services in Apache NiFi 0.0.2 through 1.21.0 allow an authenticated and authorized user to configure a Database URL with the H2 driver that enables custom code execution. The resolution validates the Database URL and rejects H2 JDBC locations. Upgrading to NiFi 1.22.0 disables H2 JDBC URLs in the default configuration.
The JndiJmsConnectionFactoryProvider Controller Service along with the ConsumeJMS and PublishJMS Processors, in Apache NiFi 1.8.0 through 1.21.0 allow an authenticated and authorized user to configure URL and library properties that enable deserialization of untrusted data from a remote location. The resolution validates the JNDI URL and restricts locations to a set of allowed schemes. Upgrading to NiFi 1.22.0 disables LDAP for JNDI URLs in the default configuration.
The ExtractCCDAAttributes Processor in Apache NiFi 1.2.0 through 1.19.1 does not restrict XML External Entity references. Flow configurations that include the ExtractCCDAAttributes Processor are vulnerable to malicious XML documents that contain Document Type Declarations with XML External Entity references. The resolution disables Document Type Declarations and disallows XML External Entity resolution in the ExtractCCDAAttributes Processor. Upgrading to NiFi 1.20.0 disables Document Type Declarations in the default configuration for ExtractCCDAAttributes.
The optional ShellUserGroupProvider in Apache NiFi 1.10.0 to 1.16.2 and Apache NiFi Registry 0.6.0 to 1.16.2 does not neutralize arguments for group resolution commands, allowing injection of operating system commands on Linux and macOS platforms. The ShellUserGroupProvider is not included in the default configuration. Command injection requires ShellUserGroupProvider to be one of the enabled User Group Providers in the Authorizers configuration. Command injection also requires an authenticated user with elevated privileges. Apache NiFi requires an authenticated user with authorization to modify access policies to execute the command. Apache NiFi Registry requires an authenticated user with authorization to read user groups to execute the command. NiFi and NiFi Registry version 1.16.3 has completely removed the shell commands from the ShellUserGroupProvider that received user arguments.
Multiple components in Apache NiFi 0.0.1 to 1.16.0 do not restrict XML External Entity references in the default configuration. The Standard Content Viewer service attempts to resolve XML External Entity references when viewing formatted XML files. The following Processors attempt to resolve XML External Entity references when configured with default property values: EvaluateXPath, EvaluateXQuery, and ValidateXml. Apache NiFi flow configurations that include these Processors are vulnerable to malicious XML documents that contain Document Type Declarations with XML External Entity references. Upgrading to NiFi 1.16.1 disables Document Type Declarations in the default configuration for these processors, and disallows XML External Entity resolution in standard services.
When creating or updating credentials for single-user access, NiFi wrote a copy of the Login Identity Providers configuration to the operating system temporary directory. The Login Identity Providers configuration file contains the username and a bcrypt hash of the configured password. On most platforms, the operating system temporary directory has global read permissions. NiFi immediately moved the temporary file to the final configuration directory, which significantly limited the window of opportunity for access. Bcrypt is a password-hashing algorithm that incorporates a random salt and a specified cost factor, designed to maintain resistance to brute-force attacks. Use of the bcrypt algorithm minimizes the impact of disclosing the single-user credentials stored in Login Identity Providers. NiFi 1.16.0 includes updates to replace the Login Identity Providers configuration without writing a file to the operating system temporary directory.
In the TransformXML processor, an authenticated user could configure an XSLT file which, if it included malicious external entity calls, may reveal sensitive information. The Secure processing property in TransformXML will now apply to the configured XSLT file as well as flow files being transformed. Users running any previous NiFi release should upgrade to 1.15.1.
The NiFi stateless execution engine produced log output which included sensitive property values. When a flow was triggered, the flow definition configuration JSON was printed, potentially containing sensitive values in plaintext. NiFi 1.12.0 implemented Argon2 secure hashing to provide a deterministic loggable value which does not reveal the sensitive value. Users running any previous NiFi release should upgrade to 1.12.0.
The NiFi download token (one-time password) mechanism used a fixed cache size and did not authenticate a request to create a download token, only when attempting to use the token to access the content. An unauthenticated user could repeatedly request download tokens, preventing legitimate users from requesting download tokens. NiFi 1.12.0 disabled anonymous authentication, implemented a multi-indexed cache, and limited token creation requests to one concurrent request per user. Users running any previous NiFi release should upgrade to 1.12.0.
The NiFi UI and API were protected by mandating TLS v1.2, as well as listening connections established by processors like ListenHTTP and HandleHttpRequest. However intra-cluster communication such as cluster request replication, Site-to-Site, and load balanced queues continued to support TLS 1.0 or 1.1. NiFI 1.12.0 refactored disparate internal SSL and TLS code, reducing exposure for extension and framework developers to low-level primitives. NiFi 1.12. also added support for TLS v1.3 on supporting JVMs. This version restricted all incoming TLS communications to TLS 1.2 or higher. Users running any previous NiFi release should upgrade to 1.12.0.
The notification service manager and various policy authorizer and user group provider objects allowed trusted administrators to inadvertently configure a potentially malicious XML file. The XML file has the ability to make external calls to services through XML External Entity resolution. NiFi 1.12.0 introduced an XML validator to prevent malicious code from being parsed and executed. Users running any previous NiFi release should upgrade to 1.12.0.
If NiFi Registry uses an authentication mechanism other than PKI, when the user clicks Log Out, NiFi Registry invalidates the authentication token on the client side but not on the server side. This permits the user's client-side token to be used for up to 12 hours after logging out to make API requests to NiFi Registry. NiFi Registry 0.6.0 invalidates the server-side authentication token immediately after the user clicks the Log Out link.
The flow fingerprint factory generated flow fingerprints which included sensitive property descriptor values. In the event a node attempted to join a cluster and the cluster flow was not inheritable, the flow fingerprint of both the cluster and local flow was printed, potentially containing sensitive values in plaintext. NiFi 1.11.1i implemented Argon2 secure hashing to provide a deterministic loggable value which does not reveal the sensitive value. Users running any previous NiFi release should upgrade to 1.11.1.
The sensitive parameter parser would log parsed property descriptor values for debugging purposes. This would expose literal values entered a sensitive property when no parameter was present. NiFi 1.11.0 removed debug logging from the class. Users running the 1.10.0 release should upgrade to 1.11.0.
Malicious scripts could be injected to the UI through action by an unaware authenticated user in Firefox. Did not appear to occur in other browsers. NiFi 1.11.0 adds sanitization of the error response ensures the XSS would not be executed. Users running earlier versions should upgrade to 1.11.0.
The XMLFileLookupService allowed trusted users to inadvertently configure a potentially malicious XML file. The XML file has the ability to make external calls to services using XML External Entity resolution and reveal information such as the versions of Java, Jersey, and Apache that the NiFI instance uses. NiFi 1.10.0 adds a validator to ensure the XML file is not malicious. Users running a prior release should upgrade to 1.10.0.
If NiFi uses an authentication mechanism other than PKI, when the user clicks Log Out, NiFi invalidates the authentication token on the client side but not on the server side. This permits the user's client-side token to be used for up to 12 hours after logging out to make API requests to NiFi. NiFi 1.10.0 invalidates the server-side authentication token immediately after the user clicks the Log Out link. Users running a prior release should upgrade to 1.10.0.
When updating a Process Group via the API, the response to the request includes all of its contents (at the top most level, not recursively). The response included details about processors and controller services which the user may not have had read access to. Requests to update or remove the process group will no longer return the contents of the process group in the response in Apache NiFi 1.10.0. Users running a prior release should upgrade to 1.10.0.
The X-Frame-Options headers were applied inconsistently on some HTTP responses, resulting in duplicate or missing security headers. Some browsers would interpret these results incorrectly, allowing clickjacking attacks. NiFi 1.8.0 consistently applies the security headers including X-Frame-Options. Users running a prior release should upgrade to 1.8.0.
The message-page.jsp error page used the value of the HTTP request header X-ProxyContextPath without sanitization, resulting in a potential reflected cross-site scripting attack. NiFi 1.8.0 correctly parses and sanitizes the request attribute value. Users running a prior release should upgrade to 1.8.0.
When a client request to a cluster node was replicated to other nodes in the cluster for verification, the Content-Length was forwarded. On a DELETE request, the body was ignored, but if the initial request had a Content-Length value other than 0, the receiving nodes would wait for the body and eventually timeout. NiFi 1.8.0 checks DELETE requests and overwrites non-zero Content-Length header. Users running a prior release should upgrade to 1.8.0.
The template upload API endpoint accepted requests from different domain when sent in conjunction with ARP spoofing and meddler in the middle (MITM) intervention, resulting in cross-site request forgery. The required attack vector is complex, requiring a scenario with client certificate authentication, same subnet access, and injecting malicious code into an unprotected (plaintext HTTP) website which the targeted user later visits, but the possible damage warranted a Critical severity level. NiFi 1.8.0 applies Cross-Origin Resource Sharing (CORS) policy request filtering. Users running a prior release should upgrade to 1.8.0.
Malicious XML content could cause information disclosure or remote code execution in the SplitXml Processor. NiFi 1.6.0 disables external general entity parsing and disallows document type declarations in SplitXml. Users running a prior release should upgrade to 1.6.0.
Malicious JMS content could cause denial of service in impacted Processors. See ActiveMQ CVE-2015-5254 announcement for more information. NiFi 1.6.0 upgrades the activemq-client library to 5.15.3. Users running a prior release should upgrade to 1.6.0.
A malicious host header in an incoming HTTP request could cause NiFi to load resources from an external server. NiFi 1.5.0 sanitizes host headers and compares to a controlled whitelist property. Users running a prior release should upgrade to 1.5.0.
A malicious X-ProxyContextPath or X-Forwarded-Context header containing external resources or embedded code could cause remote code execution. NiFi 1.5.0 includes corrected handling of these headers. Users running a prior release should upgrade to 1.5.0.
Any authenticated user (valid client certificate but without ACL permissions) could upload a template which contained malicious code and accessed sensitive files via an XML External Entity (XXE) attack. NiFi 1.14.0 properly handles XML External Entities. Users running a prior release should upgrade to 1.4.0.
Any authenticated user (valid client certificate but without ACL permissions) could upload a template which contained malicious code and cause a denial of service via Java deserialization. NiFi 1.4.0 properly handles Java deserialization. Users running a prior release should upgrade to 1.4.0.
There are certain user input components in the Apache NiFi UI which had been guarding for some forms of cross-site scripting issues but were insufficient. NiFi 0.7.4 and 1.3.0 add more complete user input sanitization. Users running a prior release should upgrade to 0.7.4 or 1.3.0.
Apache NiFi needs to establish the response header telling browsers to only allow framing with the same origin. NiFi 0.7.4 and 1.3.0 set the response header. Users running a prior release should upgrade to 0.7.4 or 1.3.0.
In a cluster environment, if an anonymous user request is replicated to another node, the originating node identity is used rather than the anonymous user. NiFi 0.7.2 and 1.1.2 remove the negative check for anonymous user before building the proxy chain and throwing an exception, and evaluating each user in the proxy chain iteration and comparing against a static constant anonymous user. Users running a prior release should upgrade to 0.7.2 or 1.1.2.
In a cluster environment, the proxy chain serialization and deserialization is vulnerable to an injection attack where a carefully crafted username could impersonate another user and gain their permissions on a replicated request to another node. NiFi 0.7.2 and 1.1.2 modify the tokenization code and sanitization of user-provided input. Users running a prior release should upgrade to 0.7.2 or 1.1.2.
There is a cross-site scripting vulnerability in connection details dialog when accessed by an authorized user. The user supplied text was not being properly handled when added to the DOM. The vulnerability was resolved after reviewing the pull request when merging changes. Users running a prior release should upgrade to 1.0.1 or 1.1.1.