Skip to content

Attachment upload broken [Self hosted Bitwarden 2025.11.1] #6647

@maxvisser

Description

@maxvisser

Steps To Reproduce

  1. Go to /#/vault
  2. Click on +New
  3. Choose Note
  4. Create a Test note item
  5. Edit item
  6. Add attachments

Expected Result

File is being uploaded

Actual Result

Unexpected error accured

2025-11-26 10:34:10.115 +00:00 [Error] Unhandled exception
System.IO.IOException: Unexpected end of Stream, the content may have already been read by another component.
   at Microsoft.AspNetCore.WebUtilities.MultipartReaderStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.WebUtilities.StreamHelperExtensions.DrainAsync(Stream stream, ArrayPool`1 bytePool, Nullable`1 limit, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.WebUtilities.MultipartReader.ReadNextSectionAsync(CancellationToken cancellationToken)
   at Bit.Api.Utilities.MultipartFormDataHelper.GetFileAsync(HttpRequest request, Func`2 callback) in /source/src/Api/Utilities/MultipartFormDataHelper.cs:line 109
   at Bit.Api.Vault.Controllers.CiphersController.PostFileForExistingAttachment(Guid id, String attachmentId) in /source/src/Api/Vault/Controllers/CiphersController.cs:line 1425
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

Screenshots or Videos

Image

Additional Context

  • rebooted bitwarden already with ./bitwarden.sh stop and ./bitwarden.sh start

Build Version

2025.11.1+28469e0

Environment

Self-Hosted

Environment Details

  • OS: Ubuntu 22.04.5 LTS
  • Docker compose
  • 2 cores, 4GB ram

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions