<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2026-02-27</periodOfReport>

    <issuer>
        <issuerCik>0000775158</issuerCik>
        <issuerName>OSHKOSH CORP</issuerName>
        <issuerTradingSymbol>OSK</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001738375</rptOwnerCik>
            <rptOwnerName>Khare Anupam</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O OSHKOSH CORPORATION</rptOwnerStreet1>
            <rptOwnerStreet2>1917 FOUR WHEEL DRIVE</rptOwnerStreet2>
            <rptOwnerCity>OSHKOSH</rptOwnerCity>
            <rptOwnerState>WI</rptOwnerState>
            <rptOwnerZipCode>54902</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>SVP/Chief Information Officer</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>0</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2026-02-27</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>3999.774</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>169.075</value>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>13576.610</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Represents weighted average price.  Individual sales by lot ranged from $166.455 to $170.000.  The Company will provide, upon request by the SEC staff, the full information regarding the number of shares purchased or sold at each separate price.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>Ignacio A. Cortina, for Anupam Khare</signatureName>
        <signatureDate>2026-03-02</signatureDate>
    </ownerSignature>
</ownershipDocument>
