CVE-2024-54128

CVE-2024-54128 is a medium-severity security vulnerability in @directus/app (npm), affecting versions >= 11.0.0, < 13.3.1. It is fixed in 13.3.1, 10.13.4, 11.2.2.

Summary

The Comment feature has implemented a filter to prevent users from adding restricted characters, such as HTML tags. However, this filter operates on the client-side, which can be bypassed, making the application vulnerable to HTML Injection.

Details

The Comment feature implements a character filter on the client-side, this can be bypassed by directly sending a request to the endpoint.

Example Request:

PATCH /activity/comment/3 HTTP/2
Host: directus.local

{
  "comment": "<h1>TEST <p style=\"color:red\">HTML INJECTION</p> <a href=\"//evil.com\">Test Link</a></h1>"
}

Example Response:

{
  "data": {
    "id": 3,
    "action": "comment",
    "user": "288fdccc-399a-40a1-ac63-811bf62e6a18",
    "timestamp": "2023-09-06T02:23:40.740Z",
    "ip": "10.42.0.1",
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36",
    "collection": "directus_files",
    "item": "7247dda1-c386-4e7a-8121-7e9c1a42c15a",
    "comment": "<h1>TEST <p style=\"color:red\">HTML INJECTION</p> <a href=\"//evil.com\">Test Link</a></h1>",
    "origin": "https://directus.local",
    "revisions": []
  }
}

Example Result:

Impact

With the introduction of session cookies this issue has become exploitable as a malicious script is now able to do authenticated actions on the current users behalf.

CVE-2024-54128 has a CVSS score of 5.7 (Medium). The vector is network-reachable, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (13.3.1, 10.13.4, 11.2.2); upgrading removes the vulnerable code path.

Affected versions

@directus/app (>= 11.0.0, < 13.3.1) directus (>= 10.10.0, < 10.13.4) directus (>= 11.0.0-rc.1, < 11.2.2)

Security releases

@directus/app → 13.3.1 (npm) directus → 10.13.4 (npm) directus → 11.2.2 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade the following packages to resolve this vulnerability:

@directus/app to 13.3.1 or later; directus to 10.13.4 or later; directus to 11.2.2 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2024-54128? CVE-2024-54128 is a medium-severity security vulnerability in @directus/app (npm), affecting versions >= 11.0.0, < 13.3.1. It is fixed in 13.3.1, 10.13.4, 11.2.2.
  2. How severe is CVE-2024-54128? CVE-2024-54128 has a CVSS score of 5.7 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2024-54128?
    • @directus/app (npm) (versions >= 11.0.0, < 13.3.1)
    • directus (npm) (versions >= 10.10.0, < 10.13.4)
  4. Is there a fix for CVE-2024-54128? Yes. CVE-2024-54128 is fixed in 13.3.1, 10.13.4, 11.2.2. Upgrade to this version or later.
  5. Is CVE-2024-54128 exploitable, and should I be worried? Whether CVE-2024-54128 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2024-54128 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2024-54128?
    • Upgrade @directus/app to 13.3.1 or later
    • Upgrade directus to 10.13.4 or later
    • Upgrade directus to 11.2.2 or later

Other vulnerabilities in @directus/app

Stop the waste.
Protect your environment with Kodem.