CVE-2021-4097: Phpservermon/phpservermon Phpservermon Is Vulnerable To CRLF Vulnerability

MODERATE
Advisory Identifier: GHSA-8qv8-fq5w-p966
CVSS 6.3
CWE-93
Published
Advisory Summary

CVE-2021-4097 is a MODERATE (CVSS 6.3) phpservermon is vulnerable to crlf vulnerability (CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')) affecting Phpservermon/phpservermon libraries in the Packagist ecosystem. The issue involves phpservermon is vulnerable to crlf injection. Remediation is available in the latest vendor maintenance releases.

CVE-2021-4097 at a Glance

CVE Identifier CVE-2021-4097
GHSA Identifier GHSA-8qv8-fq5w-p966
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')
Affected Product Phpservermon/phpservermon
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2021-4097

To remediate this vulnerability, upgrade all affected Phpservermon/phpservermon dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

phpservermon/phpservermon fixed: Latest secure release
Upgrade phpservermon/phpservermon to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for phpservermon/phpservermon

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-4097, inspect your project dependencies for Phpservermon/phpservermon:

inspect dependencies for phpservermon/phpservermon

Analyze the terminal output to locate any version of Phpservermon/phpservermon in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection'), where the product uses crlf (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes crlf sequences from inputs. In Phpservermon/phpservermon, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

phpservermon is vulnerable to Improper Neutralization of CRLF Sequences.

CVE-2021-4097 Affected Phpservermon/phpservermon Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
phpservermon/phpservermon
Packagist
≤ 3.5.2

References

Frequently Asked Questions

What is CVE-2021-4097?
CVE-2021-4097 is a security vulnerability in Phpservermon/phpservermon involving phpservermon is vulnerable to CRLF Injection under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection').
Which Phpservermon/phpservermon versions are affected?
Affected versions include releases prior to current release patches across affected packages: phpservermon/phpservermon.
What version fixes CVE-2021-4097?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is phpservermon/phpservermon affected?
Yes, phpservermon/phpservermon is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2021-4097?
CVE-2021-4097 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2021-4097?
CVE-2021-4097 is classified under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') (The product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs.).
How can I check Packagist dependencies for CVE-2021-4097?
Run the dependency tree command: 'inspect dependencies for phpservermon/phpservermon'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8qv8-fq5w-p966",
  "modified" : "2021-12-16T14:09:58Z",
  "published" : "2021-12-16T14:26:00Z",
  "aliases" : [ "CVE-2021-4097" ],
  "summary" : "phpservermon is vulnerable to CRLF Injection",
  "details" : "phpservermon is vulnerable to Improper Neutralization of CRLF Sequences.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "phpservermon/phpservermon"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "3.5.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-4097"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/phpservermon/phpservermon/commit/162bba0046fcda1580f4fbc7b9ababe3c7c13ce4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/phpservermon/phpservermon"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.dev/bounties/d617ced7-be06-4e34-9db0-63d45c003a43"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-93" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-12-14T15:10:46Z",
    "nvd_published_at" : "2021-12-12T00:15:00Z"
  }
}