CVE-2018-1294 email header injection via bounce address#161
Merged
Conversation
…ement Agent-Logs-Url: https://github.com/OpenIdentityPlatform/OpenIDM/sessions/7fbe5303-187c-442e-b40d-7d326dc05dd5 Co-authored-by: vharseko <[email protected]>
Copilot
AI
changed the title
[WIP] Update commons-email to version 1.6.0 to fix CVE-2018-1294
Fix CVE-2018-1294: pin commons-email to 1.6.0 via dependencyManagement
Apr 16, 2026
maximthomas
reviewed
Apr 17, 2026
maximthomas
requested changes
Apr 17, 2026
Co-authored-by: Maxim Thomas <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
commons-email:1.2is pulled in transitively viaorg.activiti:activiti-engine:5.15and is vulnerable to CVE-2018-1294 (email header injection via bounce address; fixed in 1.5+).Changes
pom.xml— adds two entries to<dependencyManagement>to globally pincommons-emailto1.6.0, covering bothgroupIdvariants used across Activiti versions:legal/THIRDPARTYREADME.txt— updates version reference fromcommons-email-1.2.jar→commons-email-1.6.0.jarOriginal prompt
Problem
The project has a transitive dependency on
commons-email:1.2(pulled in viaorg.activiti:activiti-engine:5.15in theopenidm-workflow-activitimodule). This version is vulnerable to CVE-2018-1294 (Improper Input Validation — header injection via bounce address).Fix
Add
commons-emailversion 1.6.0 to the<dependencyManagement>section of the rootpom.xmlto globally override the vulnerable transitive version.Add the following entry inside
<dependencyManagement><dependencies>in the rootpom.xml:Note: The old Activiti 5.15 uses
groupId=commons-email(notorg.apache.commons). You may need to check and add an entry for that groupId as well:Also update
legal/THIRDPARTYREADME.txtto reflect the new version: replacecommons-email-1.2.jarwithcommons-email-1.6.0.jar.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: предложи исправление CVE-2024-7254
User: предложи исправление CVE-2018-1294
Assistant: В репозитории используется commons-email версии 1.2, которая уязвима к CVE-2018-1294. Давайте найдём, где именно объявлена зависимость:
Assistant: Теперь найдём, где именно в pom.xml объявлена зависимость commons-email:
Assistant: ## CVE-2018-1294 — Apache Commons Email (Improper Input Validation)
Уязвимость: некорректная обработка значения «Bounce Address» в Apache Commons Email позволяет удалённому злоумышленнику выполнить атаку типа header injection в email-сообщениях.
Затронутые версии: Apache Commons Email < 1.5
Статус в репозитории OpenIdentityPlatform/OpenIDM
В файле
legal/THIRDPARTYREADME.txtзафиксирована уязвимая версия:К сожалению, мне не удалось найти явное объявление зависимости
commons-emailв XML-файлах (pom.xml) репозитория через поиск по коду. Зависимость может быть транзитивной или объявлена в родительском POM.Рекомендуемое исправление
Обновите
commons-emailдо версии 1.5 или выше. Найдите объявление зависимости (напрямую или транзитивно) и задайте версию1.6(последняя стабильная):Если зависимость транзитивная, добавьте её в секцию
<dependencyManagement>корневогоpom.xml, чтобы принудительно зафиксировать безопасную версию.Обновите
legal/THIRDPARTYREADME.txt, заменивcommons-email-1.2.jarна актуальную версию.Проверьте совместимость — API Commons Email обратно совместим, но рекомендуется прогнать тесты, связанные с отправкой email (модуль
openidm-external-email, скриптыresetPassword.jsи др.).Ссылки
User: найди откуда подттягивается commins-email
Assistant: Поиск по коду не находит
commons-emailв pom.xml файлах. Давайте посмотрим непосредственно на структуру модулей, связанных с email.Assistant: Теперь ясно. Зависимость
commons-emailне объявлена напрямую ни в одномpom.xmlэтого репозитория. Она приходит как транзитивная зависимость черезactiviti-engine:5.15.Давайте проверим это:
Assistant:
Откуда подтягивается
commons-emailЗависимость
commons-email:1.2приходит транзитивно через Activiti Engine 5.15, объявленный в модулеopenidm-workflow-activiti:Цепочка зависимостей:
Это подтверждается записью в
legal/THIRDPARTYREADME.txt, где указана именно версия 1.2: