{"answers":{"affected":"2 open source packages ship an affected version, including morgan. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-5078 in the wild and no public exploit code.","fix":"Upgrade morgan to 1.11.0 or later.","what":"CVE-2026-5078 is a medium-severity vulnerability in morgan, published on 3 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-5078 and fix it if it is affected.\n\nWhat it is: CVE-2026-5078 is a medium-severity vulnerability in morgan, published on 3 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-5078 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- morgan (npm): affected from 1.2.0; fixed in 1.11.0\n- morgan (npm): affected from 1.2.0; fixed in 1.11.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-5078/ (Markdown: https://insights.sbomify.com/CVE-2026-5078/index.md)","id":"CVE-2026-5078","markdown":"https://insights.sbomify.com/CVE-2026-5078/index.md","name":"CVE-2026-5078","record":{"aliases":["CLSA-2026-1783904625","CLSA-2026-1784596308","DEBIAN-CVE-2026-5078","GHSA-4vj7-5mj6-jm8m","MINI-2c9r-9w23-79pr","MINI-9296-w7rg-c654","MINI-gmrj-qvqc-26q4","UBUNTU-CVE-2026-5078"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js logging middleware","requires_auth":"none","summary":"An attacker can inject forged log lines via control characters in the Authorization header, compromising log integrity for applications using morgan.","user_interaction":"not_required","vuln_class":"other"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"openjs","cpe":[{"product":"morgan","vendor":"morgan_project"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-117","name":"Improper Output Neutralization for Logs"}],"description":"Impact: The morgan logging middleware's :remote-user token extracts the Basic auth username from the Authorization request header and writes it to the log stream without neutralizing control characters. An unauthenticated attacker can send a crafted Authorization Basic header containing CR or LF bytes to inject forged log lines, breaking the one-request-per-line structure of access logs and enabling log forgery against downstream log consumers. The built-in combined, common, default, and short formats are affected, as well as any custom format that references :remote-user. Affected versions: morgan 1.2.0 through 1.10.1. Patches: upgrade to morgan 1.11.0, which neutralizes control characters in the :remote-user token output. Workarounds: use a custom format string that does not include :remote-user.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"morgan vulnerable to Log Forging via unneutralized control characters in :remote-user","id":"CVE-2026-5078","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"other","year":"2026"},"n_packages":2,"n_references":2,"next":{"headline":"multer vulnerable to Denial of Service via deeply nested field names","id":"CVE-2026-5079"},"packages":[{"ecosystem":"npm","fixed":["1.11.0"],"introduced":["1.2.0"],"last_affected":[],"package":"morgan","purl":null,"source":"GHSA-4vj7-5mj6-jm8m"},{"ecosystem":"npm","fixed":["1.11.0"],"introduced":["1.2.0"],"last_affected":[],"package":"morgan","purl":"pkg:npm/morgan","source":"GHSA-4vj7-5mj6-jm8m"}],"prev":{"headline":"Cross-site scripting in Total","id":"CVE-2026-5077"},"products":["morgan"],"published":"2026-06-03","related":[{"cvss_score":9.8,"headline":"Code Injection in morgan","id":"CVE-2019-5413","kev_date_added":null,"published":"2019-03-17"},{"cvss_score":5.3,"headline":"morgan vulnerable to Log Forging via unescaped Unicode line separators","id":"CVE-2026-15603","kev_date_added":null,"published":"2026-08-28"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-06-03","vendors":["morgan"]},"summary":"An attacker can inject forged log lines via control characters in the Authorization header, compromising log integrity for applications using morgan.","url":"https://insights.sbomify.com/CVE-2026-5078/"}