You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/10/16 11:48:00 UTC

[jira] [Commented] (OFBIZ-13690) Survey PDF services read any server file named in the pdfFileNameIn parameter

    [ https://issues.apache.org/jira/browse/OFBIZ-13690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18127807#comment-18127807 ] 

ASF subversion and git services commented on OFBIZ-13690:
---------------------------------------------------------

Commit 4b0e5aad8f990b29d5a71471db515f3c5d027771 in ofbiz-framework's branch refs/heads/trunk from Mridul Pathak
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=4b0e5aad8f ]

Fixed: Survey PDF services read any server file named in the pdfFileNameIn parameter (OFBIZ-13690)

- Removed the pdfFileNameIn parameter from the survey PDF services, the BuildSurveyResponseFromPdf form and its label, so a PDF can only be given as an inputByteBuffer or a contentId.
- Removed the unused pdfFileNameOut handling in setAcroFieldsFromSurveyResponse.
- buildSurveyFromPdf and buildSurveyResponseFromPdf now require a logged-in user with the content manager CREATE permission.


> Survey PDF services read any server file named in the pdfFileNameIn parameter
> -----------------------------------------------------------------------------
>
>                 Key: OFBIZ-13690
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13690
>             Project: OFBiz
>          Issue Type: Bug
>          Components: content
>    Affects Versions: Upcoming Branch, 24.09.08
>            Reporter: Mridul Pathak
>            Assignee: Mridul Pathak
>            Priority: Major
>
> h3. Problem
> {{PdfSurveyServices.getInputByteBuffer}} opens the free-text {{pdfFileNameIn}} parameter with {{new FileInputStream(pdfFileNameIn)}} and no path check, size limit or file-type check. The five survey PDF services that accept it ({{buildSurveyFromPdf}}, {{buildSurveyResponseFromPdf}}, {{getAcroFieldsFromPdf}}, {{setAcroFields}}, {{setAcroFieldsFromSurveyResponse}}) are {{auth="false"}} with no permission check. The {{buildSurveyFromPdf}} and {{buildSurveyResponseFromPdf}} requests are in the content controller, which is also included by ordermgr and partymgr, so any back-office user who can log in to one of those apps can make the server read a file of their choice.
> h3. Impact
> Form field names and values of any PDF form readable by the OFBiz process can be copied into survey records, bypassing {{content.data.local.file.allowed.paths}}. For other files the content is not returned, but the error message reveals whether the path exists (and its size on trunk). Pointing the parameter at a device or pipe makes the server read without limit or hang a request thread.
> h3. Proposed fix
> Remove the {{pdfFileNameIn}} parameter (service attributes, the {{getInputByteBuffer}} file branch, the BuildSurveyResponseFromPdf form field and its label) together with the unused {{pdfFileNameOut}} code. Nothing in the framework or plugins calls it, and {{inputByteBuffer}} / {{contentId}} remain. Also add a permission check to {{buildSurveyFromPdf}} and {{buildSurveyResponseFromPdf}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)