Security should be one of the top priorities for any software project, and it's crucial to keep up to date with known vulnerabilities and fixes. It has recently come to light that Apache Linkis <=1.3.1 is affected by a pretty severe issue. The default token generated by Linkis Gateway deployment is too simple, making it highly susceptible to attackers. The problem lies in CVE-2023-27987, which highlights the need for random values in generation rules.

The silver lining to this cloud? By upgrading to Linkis version 1.3.2 and modifying the default token value, you can protect your system from this vulnerability. To ensure your deployment is as secure as possible, we'll walk you through the steps to do just that, using Token authorization[1] from the official Linkis documentation.

Exploit Details

The exploit relies on the inadequate default token generation process in Apache Linkis <=1.3.1. Attackers can easily obtain these generated tokens as they lack randomness and complexity. This can lead to unauthorized access and security breaches in a variety of deployments that use this token for authentication.

The Fix

To rectify this vulnerability, the first step is to upgrade Apache Linkis to version 1.3.2. Instructions and links for upgrading can be found in the official Apache Linkis documentation[1]. Once you have successfully upgraded your installation to version 1.3.2, you will have a more secure and stable environment.

After upgrading to Linkis 1.3.2, it's time to modify the default token value. Token-based authentication is vital for ensuring a secure environment. The new token should be sufficiently complex and include random values generated using secure pseudo-random number generators (PRNGs). Follow the official Token authorization[1] guide in the Linkis documentation to create a more robust token for your deployment:

import secrets
import string

# Generate a new random token with specified length and character set
def generate_token(length=32, charset=string.ascii_letters + string.digits):
  return ''.join(secrets.choice(charset) for _ in range(length))

token = generate_token()
print("New secure token:", token)

This code snippet generates a new token with a length of 32 characters and a character set that includes both uppercase and lowercase letters, plus numbers. Adjust the parameters based on your specific requirements for token complexity and length.

For more guidance on creating a secure token, consult the Token authentication[1] guide in the Linkis documentation ( Be sure to apply the new token in your deployment settings to replace the previous insecure token.


Always prioritize security when dealing with software projects, including ensuring that tokens are adequately complex and randomized. In this post, we covered CVE-2023-27987, a vulnerability affecting Apache Linkis <=1.3.1 that creates default tokens far too simple for real-world use. By upgrading to version 1.3.2 and modifying the default token values, you can keep your system protected against this known vulnerability. Stay vigilant and keep your systems up to date to minimize security risks.



Published on: 04/10/2023 08:15:00 UTC
Last modified on: 04/14/2023 08:15:00 UTC